-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'i35-valkyrize-hyku' of https://github.com/samvera/hyku …
…into i35-valkyrize-hyku
- Loading branch information
Showing
4 changed files
with
30 additions
and
15 deletions.
There are no files selected for viewing
7 changes: 3 additions & 4 deletions
7
app/services/wings/custom_queries/find_by_bulkrax_identifier.rb
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
24 changes: 24 additions & 0 deletions
24
spec/services/hyrax/custom_queries/find_by_bulkrax_identifier_spec.rb
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,24 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
|
||
RSpec.describe Hyrax::CustomQueries::FindByBulkraxIdentifier do | ||
describe '.queries' do | ||
subject { described_class.queries } | ||
let(:query_name) { :find_by_bulkrax_identifier } | ||
|
||
it { is_expected.to include(query_name) } | ||
|
||
it 'is registered with the Hyrax.query_service' do | ||
expect(Hyrax.query_service.custom_queries).to respond_to(query_name) | ||
end | ||
|
||
context ':find_by_bulkrax_identifier query' do | ||
it 'is valid SQL' do | ||
expect do | ||
Hyrax.query_service.custom_queries.find_by_bulkrax_identifier(identifier: "testing-bulkrax-1-2-3") | ||
end.not_to raise_error | ||
end | ||
end | ||
end | ||
end |