Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅ Fix flaky work_show_presenter_spec #2410

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions spec/presenters/hyku/work_show_presenter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
let(:request) { double(base_url: 'http://test.host', host: 'http://test.host') }
let(:ability) { nil }
let(:presenter) { described_class.new(solr_document, ability, request) }
let(:default_pdf_viewer_value) { Flipflop::FeatureSet.current.feature(:default_pdf_viewer).default }

describe "#manifest_url" do
subject { presenter.manifest_url }
Expand Down Expand Up @@ -39,6 +40,8 @@
let!(:test_strategy) { Flipflop::FeatureSet.current.test! }

before { allow_any_instance_of(Hyrax::IiifAv::IiifFileSetPresenter).to receive(:pdf?).and_return true }
# Return state of the tenant to the default after test suite
after { test_strategy.switch!(:default_pdf_viewer, default_pdf_viewer_value) }

context 'when the tenant is not configured to use IIIF Print' do
before { test_strategy.switch!(:default_pdf_viewer, true) }
Expand Down
Loading