summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-11-05 10:09:49 +0900
committerShinya Maeda <shinya@gitlab.com>2018-11-05 10:09:49 +0900
commit5dda167e394a008008d2829763adea0c1488b850 (patch)
tree58a0b664ce7b87bf7d1f9d49b35fb4bd37d6ff14
parent52f7b09127d19f956c289c72d15ca8ab817b8d70 (diff)
downloadgitlab-ce-add-action-to-deployment.tar.gz
Add tests for action columnadd-action-to-deployment
-rw-r--r--spec/models/concerns/deployable_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/concerns/deployable_spec.rb b/spec/models/concerns/deployable_spec.rb
index e30e9689717..af81dcc3034 100644
--- a/spec/models/concerns/deployable_spec.rb
+++ b/spec/models/concerns/deployable_spec.rb
@@ -22,6 +22,18 @@ describe Deployable do
expect(deployment.on_stop).to eq('stop_review_app')
expect(environment.name).to eq('review/master')
end
+
+ it 'has a relevant value on action column' do
+ expect(deployment).to be_start
+ end
+ end
+
+ context 'when the deployable object will stop the production' do
+ let!(:job) { create(:ci_build, :stop_review_app) }
+
+ it 'has a relevant value on action column' do
+ expect(deployment).to be_stop
+ end
end
context 'when the deployable object has already had a deployment' do