summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-10-12 11:22:19 +0900
committerShinya Maeda <shinya@gitlab.com>2018-10-12 11:22:19 +0900
commitf056bb1da97d01d6db822b52b733aace8887a588 (patch)
tree8cd6ec0226465b1f792c39affca0876c18dde563
parent4f46fadd7e970b24d13f271596a8f3fd8c774aba (diff)
downloadgitlab-ce-f056bb1da97d01d6db822b52b733aace8887a588.tar.gz
Improve deployment entity spec
-rw-r--r--spec/serializers/deployment_entity_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/serializers/deployment_entity_spec.rb b/spec/serializers/deployment_entity_spec.rb
index 698fbd818c0..8793a762f9d 100644
--- a/spec/serializers/deployment_entity_spec.rb
+++ b/spec/serializers/deployment_entity_spec.rb
@@ -29,16 +29,16 @@ describe DeploymentEntity do
let(:build) { create(:ci_build, :success, pipeline: pipeline) }
let(:deployment) { create(:deployment, deployable: build) }
- context 'when deployment has another action' do
- let(:other_build) { create(:ci_build, :scheduled, pipeline: pipeline, name: 'other build') }
+ context 'when the same pipeline has a scheduled action' do
+ let(:other_build) { create(:ci_build, :schedulable, :success, pipeline: pipeline, name: 'other build') }
let!(:other_deployment) { create(:deployment, deployable: other_build) }
- it 'returns other actions' do
+ it 'returns other scheduled actions' do
expect(subject[:scheduled_actions][0][:name]).to eq 'other build'
end
end
- context 'when deployment does not have other actions' do
+ context 'when the same pipeline does not have a scheduled action' do
it 'does not return other actions' do
expect(subject[:scheduled_actions]).to be_empty
end