diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-12 14:48:43 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-12 14:48:43 +0300 |
commit | 2aa211fa69ffd02ba11757e06e19d34f6ca51865 (patch) | |
tree | cba18999257837397d1a0bcfb8e6e3de843362ff /spec/models/environment_spec.rb | |
parent | 55aa727eff50a9472405b302645abb54f28bdba0 (diff) |
Use build policy to determine if user can play build
Diffstat (limited to 'spec/models/environment_spec.rb')
-rw-r--r-- | spec/models/environment_spec.rb | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb index fb7cee47ae8..9e00f2247e8 100644 --- a/spec/models/environment_spec.rb +++ b/spec/models/environment_spec.rb @@ -155,31 +155,6 @@ describe Environment, models: true do end end - describe '#can_trigger_stop_action?' do - let(:user) { create(:user) } - let(:project) { create(:project) } - - let(:environment) do - create(:environment, :with_review_app, project: project) - end - - context 'when user can trigger stop action' do - before do - project.add_developer(user) - end - - it 'returns value that evaluates to true' do - expect(environment.can_trigger_stop_action?(user)).to be_truthy - end - end - - context 'when user is not allowed to trigger stop action' do - it 'returns value that evaluates to false' do - expect(environment.can_trigger_stop_action?(user)).to be_falsey - end - end - end - describe '#stop_with_action!' do let(:user) { create(:admin) } |