Skip to content

Commit

Permalink
skip Wings specific SolrDocumentBehavior tests if disable_wings
Browse files Browse the repository at this point in the history
  • Loading branch information
tamsin johnson committed Aug 25, 2023
1 parent d4fcb10 commit b1cd0ab
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions spec/models/concerns/hyrax/solr_document_behavior_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
end
end

context 'with a Wings model name' do
context 'with a Wings model name', :active_fedora do
let(:solr_hash) { { 'has_model_ssim' => 'Wings(Monograph)' } }

it 'gives an appropriate generated ActiveFedora class' do
Expand Down Expand Up @@ -66,18 +66,13 @@
end

context 'using non-wings adapter', valkyrie_adapter: :test_adapter do
before do
allow(Hyrax.config).to receive(:disable_wings).and_return(true)
hide_const("Wings")
end

it 'does not call Wings' do
expect(solr_document.hydra_model).to eq Monograph
end
end
end

context 'with a Wings model name' do
context 'with a Wings model name', :active_fedora do
let(:solr_hash) { { 'has_model_ssim' => 'Wings(Monograph)' } }

it 'gives an appropriate generated ActiveFedora class' do
Expand Down Expand Up @@ -159,7 +154,7 @@
end
end

context 'with a Wings model name' do
context 'with a Wings model name', :active_fedora do
let(:solr_hash) { { 'has_model_ssim' => 'Wings(Monograph)', 'id' => '123' } }

it 'gives the original valkyrie class' do
Expand Down

0 comments on commit b1cd0ab

Please sign in to comment.