diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-07-12 12:22:11 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-07-12 12:22:11 +0200 |
commit | e270366d844d27ba55b96fb589b8505502c76a08 (patch) | |
tree | b9b6c28de91e158c333bb600d68a8a4190cbf4e2 /spec/models/environment_spec.rb | |
parent | 66c3007ccb7b41226c4264c00c281b09ee729dd4 (diff) | |
download | gitlab-ce-e270366d844d27ba55b96fb589b8505502c76a08.tar.gz |
Rename environments stop action method
This makes it more explicit that an environment is not a stop action,
but instead is merely contains a stop action.
Diffstat (limited to 'spec/models/environment_spec.rb')
-rw-r--r-- | spec/models/environment_spec.rb | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb index 4bded9efe91..c65e0b81451 100644 --- a/spec/models/environment_spec.rb +++ b/spec/models/environment_spec.rb @@ -170,8 +170,8 @@ describe Environment do end end - describe '#stop_action?' do - subject { environment.stop_action? } + describe '#stop_action_available?' do + subject { environment.stop_action_available? } context 'when no other actions' do it { is_expected.to be_falsey } @@ -179,8 +179,17 @@ describe Environment do context 'when matching action is defined' do let(:build) { create(:ci_build) } - let!(:deployment) { create(:deployment, environment: environment, deployable: build, on_stop: 'close_app') } - let!(:close_action) { create(:ci_build, :manual, pipeline: build.pipeline, name: 'close_app') } + + let!(:deployment) do + create(:deployment, environment: environment, + deployable: build, + on_stop: 'close_app') + end + + let!(:close_action) do + create(:ci_build, :manual, pipeline: build.pipeline, + name: 'close_app') + end context 'when environment is available' do before do |