-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle the case where no solr response is available in context (e.g. …
…SirTrevor search results widget). (#1073)
- Loading branch information
1 parent
20541da
commit 597a4da
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rails_helper' | ||
|
||
describe CatalogController do | ||
describe '#full_text_highlight_exists_in_response?' do | ||
context 'when there is no solr response' do | ||
it 'does not throw an error (returns false)' do | ||
expect( | ||
described_class.full_text_highlight_exists_in_response?( | ||
instance_double('Context'), | ||
instance_double('Config'), | ||
SolrDocument.new(id: 'abc123') | ||
) | ||
).to be false | ||
end | ||
end | ||
end | ||
end |