Skip to content

Commit

Permalink
Force ext store on and off in spec
Browse files Browse the repository at this point in the history
  • Loading branch information
dlpierce committed Feb 5, 2025
1 parent 4c8cc56 commit 0b159e6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions spec/actors/hyrax/actors/file_actor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,16 @@
.with(:essi, :store_original_files) \
.and_return(true)
end
it 'saves an image file to the member file_set' do
file_actor.ingest_file(io)
expect(file_set.reload.original_file.mime_type).to include "image/png"
context 'when :store_in_external_storage is false' do
before do
allow(ESSI.config).to receive(:dig) \
.with(:essi, :store_in_external_storage) \
.and_return(false)
end
it 'saves an image file to the member file_set' do
file_actor.ingest_file(io)
expect(file_set.reload.original_file.mime_type).to include "image/png"
end
end
context 'when :store_in_external_storage is true' do
before do
Expand Down

0 comments on commit 0b159e6

Please sign in to comment.