diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2017-10-31 04:00:40 +0300 |
---|---|---|
committer | Gabriel Mazetto <brodock@gmail.com> | 2017-10-31 04:00:40 +0300 |
commit | 6a4534b62fad51e5e9da0d132ed64626ffdc2d10 (patch) | |
tree | 8ab57cf8fb2943c9346a3fb04ee585658ce5c036 /spec/models/project_spec.rb | |
parent | 95fa62701c9e0f0c927b61852675ffc1493dfb34 (diff) |
Code Style changes and `hashed_storage?` now receives optional feature
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 |