Commit e1e618ac authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix object_store_uploader_spec.rb

parent 232acbc0
...@@ -25,18 +25,20 @@ describe ObjectStoreUploader do ...@@ -25,18 +25,20 @@ describe ObjectStoreUploader do
describe '#file_storage?' do describe '#file_storage?' do
context 'when file storage is used' do context 'when file storage is used' do
before do before do
uploader_class.storage(:file) expect(object).to receive(:artifacts_file_store).and_return(described_class::LOCAL_STORE)
end end
it { is_expected.to be_file_storage } it { expect(uploader).to be_file_storage }
end end
context 'when is remote storage' do context 'when is remote storage' do
before do before do
uploader_class.storage(:fog) uploader_class.storage_options double(
object_store: double(enabled: true))
expect(object).to receive(:artifacts_file_store).and_return(described_class::REMOTE_STORE)
end end
it { is_expected.not_to be_file_storage } it { expect(uploader).not_to be_file_storage }
end end
end end
...@@ -46,7 +48,7 @@ describe ObjectStoreUploader do ...@@ -46,7 +48,7 @@ describe ObjectStoreUploader do
uploader_class.cache_storage(:file) uploader_class.cache_storage(:file)
end end
it { is_expected.to be_file_cache_storage } it { expect(uploader).to be_file_cache_storage }
end end
context 'when is remote storage' do context 'when is remote storage' do
...@@ -54,7 +56,7 @@ describe ObjectStoreUploader do ...@@ -54,7 +56,7 @@ describe ObjectStoreUploader do
uploader_class.cache_storage(:fog) uploader_class.cache_storage(:fog)
end end
it { is_expected.not_to be_file_cache_storage } it { expect(uploader).not_to be_file_cache_storage }
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment