Skip to content

Commit

Permalink
Valkyrizes spec/helpers/hyrax/file_set_helper_spec.rb.
Browse files Browse the repository at this point in the history
  • Loading branch information
bwatson78 authored and tamsin johnson committed Nov 20, 2023
1 parent 1739dc6 commit dac6427
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/helpers/hyrax/file_set_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
RSpec.describe Hyrax::FileSetHelper do
describe '#display_media_download_link?' do
let(:ability) { double(Ability) }
let(:file_set) { FactoryBot.create(:file_set) }
let(:file_set) { valkyrie_create(:hyrax_file_set) }

before do
allow(controller).to receive(:current_ability).and_return(ability)
Expand All @@ -22,9 +22,9 @@

context 'with a FileSetPresenter' do
let(:ability) { Ability.new(user) }
let(:file_set) { FactoryBot.create(:file_set, user: user) }
let(:file_set) { valkyrie_create(:hyrax_file_set, :public, depositor: user.user_key) }
let(:presenter) { Hyrax::FileSetPresenter.new(solr_document, ability) }
let(:solr_document) { SolrDocument.new(file_set.to_solr) }
let(:solr_document) { SolrDocument.new(Hyrax::ValkyrieIndexer.for(resource: file_set).to_solr) }
let(:user) { FactoryBot.create(:user) }

it 'resolves permissions based on the solr document' do
Expand Down

0 comments on commit dac6427

Please sign in to comment.