-
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.
This fixes advanced search. When I added
blacklight_advanced_search
…
…, I added the `SearchBuilder` class from the previous version of MIRA. It seems that the `SearchBuilder` class was conflicting with those classes in Hyrax. When I removed them, advanced search functionality returned. This commit deletes those classe and removes refs to them in the catalog controller. I also updated the feature spec to make sure that results being returned by advanced search are correct. This also includes a search spec that I wrote to make sure that non-advanced search is returning correct results as well. Closes #578
- Loading branch information
Showing
6 changed files
with
32 additions
and
28 deletions.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,26 @@ | ||
require 'rails_helper' | ||
include Warden::Test::Helpers | ||
|
||
RSpec.feature 'perform an advanced search', :clean do | ||
let(:pdf) { FactoryGirl.create(:pdf) } | ||
let(:another_pdf) { FactoryGirl.create(:populated_pdf) } | ||
let(:user) { FactoryGirl.create(:admin) } | ||
|
||
before { login_as user } | ||
|
||
scenario 'performing a basic search to find the first pdf' do | ||
visit '/dashboard' | ||
fill_in 'search-field-header', with: pdf.title[0] | ||
click_on 'Go' | ||
expect(page).to have_selector('.blacklight-pdf') | ||
expect(page).to have_content(pdf.title[0]) | ||
end | ||
|
||
scenario 'performing a basic search to find the second pdf' do | ||
visit '/dashboard' | ||
fill_in 'search-field-header', with: another_pdf.title[0] | ||
click_on 'Go' | ||
expect(page).to have_selector('.blacklight-pdf') | ||
expect(page).to have_content(another_pdf.title[0]) | ||
end | ||
end |