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

make hyrax_helper_spec pass on .koppie #6248

Merged
merged 1 commit into from
Aug 29, 2023
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
15 changes: 11 additions & 4 deletions spec/helpers/hyrax_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ def new_state

RSpec.describe HyraxHelper, type: :helper do
describe "show_transfer_request_title" do
let(:sender) { create(:user) }
let(:user) { create(:user) }
let(:sender) { FactoryBot.create(:user) }
let(:user) { FactoryBot.create(:user) }

context "when work is canceled" do
let(:request) do
Expand Down Expand Up @@ -395,7 +395,14 @@ def new_state
expect(helper.thumbnail_label_for(object: Object.new)).to be_a String
end

it 'interoperates with CollectionForm' do
it 'interoperates with display objects with #thumbnail_title' do
model_or_presenter_or_form = double(thumbnail_title: 'my display thumbnail title')

expect(helper.thumbnail_label_for(object: model_or_presenter_or_form))
.to eq 'my display thumbnail title'
end

it 'interoperates with CollectionForm', :active_fedora do
collection = ::Collection.new
collection.thumbnail = ::FileSet.create(title: ["thumbnail"])

Expand All @@ -406,7 +413,7 @@ def new_state
expect(helper.thumbnail_label_for(object: form)).to eq 'thumbnail'
end

it 'interoperates with AdminSetForm' do
it 'interoperates with AdminSetForm', :active_fedora do
admin_set = AdminSet.new
admin_set.thumbnail = ::FileSet.create(title: ["thumbnail"])

Expand Down