This repository has been archived by the owner on May 1, 2023. It is now read-only.
forked from NCSU-Libraries/quick_search
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from dsteelma-umd/feature/LIBSEARCH-155
LIBSEARCH-155. Pass Best Bet keywords through "filter_query" method https://issues.umd.edu/browse/LIBSEARCH-155
- Loading branch information
Showing
5 changed files
with
52 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
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,15 @@ | ||
require 'test_helper' | ||
|
||
class BestBestInitializerTest < ActionDispatch::IntegrationTest | ||
test 'best bet keyword with dash should be found' do | ||
# Clear the solr_url so we don't try to get Best Bet from Solr | ||
QuickSearch::Engine::APP_CONFIG['best_bets']['solr_url'] = '' | ||
|
||
# Keyword for "testbestbet" entry in test/dummy/config/best_bets.yml | ||
visit xhr_search_path(q: '123-456', endpoint: 'best_bets', format: 'json') | ||
|
||
json = JSON.parse(page.html) | ||
first_result = json['results'][0] | ||
assert_equal 'testbestbet', first_result['id'] | ||
end | ||
end |