Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/ci/config/entry/environment_spec.rb')
-rw-r--r--spec/lib/gitlab/ci/config/entry/environment_spec.rb26
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