Skip to content

Commit

Permalink
Workaround for json 2.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Dec 4, 2023
1 parent c6a6786 commit ea70b36
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion spec/searchers/quick_search/article_searcher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
subject(:searcher) { described_class.new(HTTP, query, 10) }

let(:query) { 'my query' }
let(:response) { JSON.dump(response: { docs: [] }) }
let(:response) { JSON.dump({ response: { docs: [] } }) }

before do
stub_request(:get, /.*/).to_return(body: response)
Expand Down
2 changes: 1 addition & 1 deletion spec/searchers/quick_search/catalog_searcher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
subject(:searcher) { described_class.new(HTTP, query, 10) }

let(:query) { 'my query' }
let(:response) { JSON.dump(response: { docs: [] }) }
let(:response) { JSON.dump({ response: { docs: [] } }) }

before do
stub_request(:get, /.*/).to_return(body: response)
Expand Down
16 changes: 8 additions & 8 deletions spec/services/article_search_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
subject(:service) { described_class.new }

let(:response) do
JSON.dump(
response: {
docs:
[
{ id: 'abc123', eds_composed_title: 'Composed title', fulltext_link_html: '<a href="#">Link</a>' }
]
}
)
JSON.dump({
response: {
docs:
[
{ id: 'abc123', eds_composed_title: 'Composed title', fulltext_link_html: '<a href="#">Link</a>' }
]
}
})
end
let(:query) { ArticleSearchService::Request.new('my query') }

Expand Down
2 changes: 1 addition & 1 deletion spec/services/catalog_search_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
RSpec.describe CatalogSearchService do
subject(:service) { described_class.new }

let(:response) { JSON.dump(response: { docs: [] }) }
let(:response) { JSON.dump({ response: { docs: [] } }) }
let(:query) { CatalogSearchService::Request.new('my query') }

before do
Expand Down

0 comments on commit ea70b36

Please sign in to comment.