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/serializers/deployment_entity_spec.rb')
-rw-r--r--spec/serializers/deployment_entity_spec.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/spec/serializers/deployment_entity_spec.rb b/spec/serializers/deployment_entity_spec.rb
index 500d5718bf1..a017f7523e9 100644
--- a/spec/serializers/deployment_entity_spec.rb
+++ b/spec/serializers/deployment_entity_spec.rb
@@ -60,12 +60,16 @@ RSpec.describe DeploymentEntity do
end
context 'when the pipeline has another manual action' do
- let(:other_build) { create(:ci_build, :manual, name: 'another deploy', pipeline: pipeline) }
- let!(:other_deployment) { create(:deployment, deployable: other_build) }
+ let!(:other_build) do
+ create(:ci_build, :manual, name: 'another deploy',
+ pipeline: pipeline, environment: build.environment)
+ end
+
+ let!(:other_deployment) { create(:deployment, deployable: build) }
it 'returns another manual action' do
- expect(subject[:manual_actions].count).to eq(1)
- expect(subject[:manual_actions].first[:name]).to eq('another deploy')
+ expect(subject[:manual_actions].count).to eq(2)
+ expect(subject[:manual_actions].pluck(:name)).to match_array(['test', 'another deploy'])
end
context 'when user is a reporter' do