diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2019-01-24 19:07:10 +0100 |
---|---|---|
committer | Gabriel Mazetto <brodock@gmail.com> | 2019-01-25 20:26:35 +0100 |
commit | 02ac66de9063178ef03c3580cae886e4137948be (patch) | |
tree | 568a7c16f50c3772e78ca80c65705425383756e9 /spec | |
parent | 7bc16889df458865ffbbb7bef8087c04a5768a1d (diff) | |
download | gitlab-ce-02ac66de9063178ef03c3580cae886e4137948be.tar.gz |
Track when MigrateAttachmentsService is skipped
We need this new state for the Geo event logic in EE
Diffstat (limited to 'spec')
-rw-r--r-- | spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb b/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb index bef12df583e..61dbb57ec08 100644 --- a/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb +++ b/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb @@ -32,6 +32,12 @@ describe Projects::HashedStorage::MigrateAttachmentsService do it 'returns true' do expect(service.execute).to be_truthy end + + it 'sets skipped to false' do + service.execute + + expect(service.skipped?).to be_falsey + end end context 'when original folder does not exist anymore' do @@ -49,10 +55,14 @@ describe Projects::HashedStorage::MigrateAttachmentsService do end it 'returns true' do - expect(FileUtils).not_to receive(:mv).with(base_path(legacy_storage), base_path(hashed_storage)) - expect(service.execute).to be_truthy end + + it 'sets skipped to true' do + service.execute + + expect(service.skipped?).to be_truthy + end end context 'when target folder already exists' do |