Skip to content

Commit

Permalink
fix the two specs that reverted to failing after updating #to_global_…
Browse files Browse the repository at this point in the history
…id to check whether the item being examined was a Valkyrie::Resource, and not whether Hyrax.config.use_valkyrie? is true.

ref: #5573
  • Loading branch information
alishaevn committed Jul 28, 2023
1 parent b21b51b commit 92ff4f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions spec/models/concerns/hyrax/solr_document_behavior_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@
end

it 'gives the global id for the valkyrie class' do
model_name = Hyrax.config.use_valkyrie? ? 'Hyrax::ValkyrieGlobalIdProxy' : 'Monograph'
expect(solr_document.to_model.to_global_id.to_s).to end_with("#{model_name}/123")
expect(solr_document.to_model.to_global_id.to_s).to end_with('Hyrax::ValkyrieGlobalIdProxy/123')
end
end
end
Expand Down
5 changes: 1 addition & 4 deletions spec/models/sipity_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,8 @@
context "with a SolrDocument" do
let(:object) { SolrDocument.new(id: '9999', has_model_ssim: ["GenericWork"]) }
let(:workflow_state) { create(:workflow_state) }
let(:proxy_for_global_id) do
Hyrax.config.use_valkyrie? ? 'Hyrax::ValkyrieGlobalIdProxy' : 'GenericWork'
end
let!(:entity) do
Sipity::Entity.create(proxy_for_global_id: "gid://#{GlobalID.app}/#{proxy_for_global_id}/9999",
Sipity::Entity.create(proxy_for_global_id: "gid://#{GlobalID.app}/GenericWork/9999",
workflow_state: workflow_state,
workflow: workflow_state.workflow)
end
Expand Down

0 comments on commit 92ff4f4

Please sign in to comment.