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/environment_serializer_spec.rb')
-rw-r--r--spec/serializers/environment_serializer_spec.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/serializers/environment_serializer_spec.rb b/spec/serializers/environment_serializer_spec.rb
index fe6278084f9..47d2c8b3794 100644
--- a/spec/serializers/environment_serializer_spec.rb
+++ b/spec/serializers/environment_serializer_spec.rb
@@ -227,8 +227,11 @@ RSpec.describe EnvironmentSerializer do
def create_environment_with_associations(project)
create(:environment, project: project).tap do |environment|
- create(:deployment, :success, environment: environment, project: project)
- create(:deployment, :running, environment: environment, project: project)
+ pipeline = create(:ci_pipeline, project: project)
+ manual_build = create(:ci_build, :manual, project: project, pipeline: pipeline, environment: environment.name)
+ scheduled_build = create(:ci_build, :scheduled, project: project, pipeline: pipeline, environment: environment.name)
+ create(:deployment, :success, environment: environment, project: project, deployable: manual_build)
+ create(:deployment, :running, environment: environment, project: project, deployable: scheduled_build)
end
end
end