diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/lib/gitlab/ci/config/entry/environment_spec.rb | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/lib/gitlab/ci/config/entry/environment_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/config/entry/environment_spec.rb | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/spec/lib/gitlab/ci/config/entry/environment_spec.rb b/spec/lib/gitlab/ci/config/entry/environment_spec.rb index dd8a79f0d84..36c26c8ee4f 100644 --- a/spec/lib/gitlab/ci/config/entry/environment_spec.rb +++ b/spec/lib/gitlab/ci/config/entry/environment_spec.rb @@ -92,24 +92,18 @@ RSpec.describe Gitlab::Ci::Config::Entry::Environment do end context 'when valid action is used' do - let(:config) do - { name: 'production', - action: 'start' } - end - - it 'is valid' do - expect(entry).to be_valid + where(:action) do + %w(start stop prepare verify access) end - end - context 'when prepare action is used' do - let(:config) do - { name: 'production', - action: 'prepare' } - end + with_them do + let(:config) do + { name: 'production', action: action } + end - it 'is valid' do - expect(entry).to be_valid + it 'is valid' do + expect(entry).to be_valid + end end end @@ -148,7 +142,7 @@ RSpec.describe Gitlab::Ci::Config::Entry::Environment do describe '#errors' do it 'contains error about invalid action' do expect(entry.errors) - .to include 'environment action should be start, stop or prepare' + .to include 'environment action should be start, stop, prepare, verify, or access' end end end |