diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-05-01 23:27:54 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-05-01 23:27:54 +0300 |
commit | 9bb7abedf57f5325a92bebc2d93b85cf7e1fc303 (patch) | |
tree | 84fe11877609631929b2911ff44bb0d500c8bc2a /spec/uploaders/lfs_object_uploader_spec.rb | |
parent | 9267ef0bd1d2d9ee4b7fe596762fec3e978a02f3 (diff) |
Fix file_store for artifacts and lfs when saving
Diffstat (limited to 'spec/uploaders/lfs_object_uploader_spec.rb')
-rw-r--r-- | spec/uploaders/lfs_object_uploader_spec.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/spec/uploaders/lfs_object_uploader_spec.rb b/spec/uploaders/lfs_object_uploader_spec.rb index a2fb3886610..9f28510c3e4 100644 --- a/spec/uploaders/lfs_object_uploader_spec.rb +++ b/spec/uploaders/lfs_object_uploader_spec.rb @@ -46,8 +46,7 @@ describe LfsObjectUploader do end describe 'remote file' do - let(:remote) { described_class::Store::REMOTE } - let(:lfs_object) { create(:lfs_object, file_store: remote) } + let(:lfs_object) { create(:lfs_object, :object_storage, :with_file) } context 'with object storage enabled' do before do @@ -57,16 +56,11 @@ describe LfsObjectUploader do it 'can store file remotely' do allow(ObjectStorage::BackgroundMoveWorker).to receive(:perform_async) - store_file(lfs_object) + lfs_object - expect(lfs_object.file_store).to eq remote + expect(lfs_object.file_store).to eq(described_class::Store::REMOTE) expect(lfs_object.file.path).not_to be_blank end end end - - def store_file(lfs_object) - lfs_object.file = fixture_file_upload(Rails.root.join("spec/fixtures/dk.png"), "`/png") - lfs_object.save! - end end |