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
describe '#file_storage?' do
context 'when file storage is used' do
before do
uploader_class.storage(:file)
expect(object).to receive(:artifacts_file_store).and_return(described_class::LOCAL_STORE)
end
it { is_expected.to be_file_storage }
it { expect(uploader).to be_file_storage }
end
context 'when is remote storage' 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
it { is_expected.not_to be_file_storage }
it { expect(uploader).not_to be_file_storage }
end
end
......@@ -46,7 +48,7 @@ describe ObjectStoreUploader do
uploader_class.cache_storage(:file)
end
it { is_expected.to be_file_cache_storage }
it { expect(uploader).to be_file_cache_storage }
end
context 'when is remote storage' do
......@@ -54,7 +56,7 @@ describe ObjectStoreUploader do
uploader_class.cache_storage(:fog)
end
it { is_expected.not_to be_file_cache_storage }
it { expect(uploader).not_to be_file_cache_storage }
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