diff options
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r-- | spec/models/project_spec.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index d80af378140..fb5d0f9db9c 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -2630,8 +2630,22 @@ describe Project do end describe '#hashed_storage?' do - it 'returns true' do - expect(project.hashed_storage?).to be_truthy + context 'without specifying feature' do + it 'returns true' do + expect(project.hashed_storage?).to be_truthy + end + 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 + + expect(project.hashed_storage?(:attachments)).to be_falsey + end end end |