diff options
Diffstat (limited to 'spec/serializers/deployment_entity_spec.rb')
-rw-r--r-- | spec/serializers/deployment_entity_spec.rb | 12 |
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..4452ccbcf07 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].second[:name]).to eq('another deploy') end context 'when user is a reporter' do |