Skip to content

Commit

Permalink
🧹 Remove PALS specific feature request
Browse files Browse the repository at this point in the history
In addition to the specific feature request, test the
`fetch_service_for` against a Hyrax native service (instead of one that
is found only in PALS)
  • Loading branch information
jeremyf committed Dec 18, 2023
1 parent 3d2ba22 commit 795dbe9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions spec/helpers/blacklight/advanced_search_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
it "returns the first 6 advanced search fields" do
expect(primary_search_fields_for(search_fields_for_advanced_search).size).to eq(6)
end

it "returns the client specified advanced search fields" do
expect(primary_search_fields_for(search_fields_for_advanced_search).map { |search| search.last.key })
.to eq(["title", "creator", "date_created", "keyword", "license", "subject"])
end
end

describe "#secondary_search_fields" do
Expand Down Expand Up @@ -73,11 +68,11 @@ def fetch_local_yml(key)

describe "#fetch_service_for" do
it "returns the service class for a given a valid key" do
expect(fetch_service_for('accessibility_feature')).to eq(Hyrax::AccessibilityFeaturesService)
expect(fetch_service_for('rights_statement')).to eq(Hyrax::RightsStatementService)
end

it "returns the service even if it should have been plural" do
expect(fetch_service_for('accessibility_features')).to eq(Hyrax::AccessibilityFeaturesService)
expect(fetch_service_for('rights_statement')).to eq(Hyrax::RightsStatementService)
end

it "returns nil for an invalid key" do
Expand Down

0 comments on commit 795dbe9

Please sign in to comment.