Skip to content

Commit 0b159e6

Browse files
committed
Force ext store on and off in spec
1 parent 4c8cc56 commit 0b159e6

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

spec/actors/hyrax/actors/file_actor_spec.rb

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,16 @@
4848
.with(:essi, :store_original_files) \
4949
.and_return(true)
5050
end
51-
it 'saves an image file to the member file_set' do
52-
file_actor.ingest_file(io)
53-
expect(file_set.reload.original_file.mime_type).to include "image/png"
51+
context 'when :store_in_external_storage is false' do
52+
before do
53+
allow(ESSI.config).to receive(:dig) \
54+
.with(:essi, :store_in_external_storage) \
55+
.and_return(false)
56+
end
57+
it 'saves an image file to the member file_set' do
58+
file_actor.ingest_file(io)
59+
expect(file_set.reload.original_file.mime_type).to include "image/png"
60+
end
5461
end
5562
context 'when :store_in_external_storage is true' do
5663
before do

0 commit comments

Comments
 (0)