diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/project_spec.rb | 20 | ||||
-rw-r--r-- | spec/services/projects/hashed_storage_migration_service_spec.rb | 2 |
2 files changed, 7 insertions, 15 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index fb5d0f9db9c..5eaff405c0e 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -2494,7 +2494,7 @@ describe Project do describe '#hashed_storage?' do it 'returns false' do - expect(project.hashed_storage?).to be_falsey + expect(project.hashed_storage?(:repository)).to be_falsey end end @@ -2630,22 +2630,14 @@ describe Project do end describe '#hashed_storage?' do - context 'without specifying feature' do - it 'returns true' do - expect(project.hashed_storage?).to be_truthy - end + it 'returns true if rolled out' do + expect(project.hashed_storage?(:attachments)).to be_truthy end - context 'specifying feature' do - it 'returns true if rolled out' do - expect(project.hashed_storage?(:attachments)).to be_truthy - end - - it 'returns false when not rolled out yet' do - project.storage_version = 1 + it 'returns false when not rolled out yet' do + project.storage_version = 1 - expect(project.hashed_storage?(:attachments)).to be_falsey - end + expect(project.hashed_storage?(:attachments)).to be_falsey end end diff --git a/spec/services/projects/hashed_storage_migration_service_spec.rb b/spec/services/projects/hashed_storage_migration_service_spec.rb index aa1988d29d6..b71b47c59b6 100644 --- a/spec/services/projects/hashed_storage_migration_service_spec.rb +++ b/spec/services/projects/hashed_storage_migration_service_spec.rb @@ -23,7 +23,7 @@ describe Projects::HashedStorageMigrationService do it 'updates project to be hashed and not read-only' do service.execute - expect(project.hashed_storage?).to be_truthy + expect(project.hashed_storage?(:repository)).to be_truthy expect(project.repository_read_only).to be_falsey end |