summaryrefslogtreecommitdiff
path: root/spec/contracts/provider/states/project/pipeline/show_state.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 08:17:02 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 08:17:02 +0000
commitb39512ed755239198a9c294b6a45e65c05900235 (patch)
treed234a3efade1de67c46b9e5a38ce813627726aa7 /spec/contracts/provider/states/project/pipeline/show_state.rb
parentd31474cf3b17ece37939d20082b07f6657cc79a9 (diff)
downloadgitlab-ce-b39512ed755239198a9c294b6a45e65c05900235.tar.gz
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'spec/contracts/provider/states/project/pipeline/show_state.rb')
-rw-r--r--spec/contracts/provider/states/project/pipeline/show_state.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/contracts/provider/states/project/pipeline/show_state.rb b/spec/contracts/provider/states/project/pipeline/show_state.rb
new file mode 100644
index 00000000000..3365647cd13
--- /dev/null
+++ b/spec/contracts/provider/states/project/pipeline/show_state.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+Pact.provider_states_for "Pipelines#show" do
+ provider_state "a pipeline for a project exists" do
+ set_up do
+ user = User.find_by(name: Provider::UsersHelper::CONTRACT_USER_NAME)
+ namespace = create(:namespace, name: 'gitlab-org')
+ project = create(:project, :repository, name: 'gitlab-qa', namespace: namespace, creator: user)
+ scheduled_job = create(:ci_build, :scheduled)
+ manual_job = create(:ci_build, :manual)
+
+ project.add_maintainer(user)
+
+ create(
+ :ci_pipeline,
+ :with_job,
+ :success,
+ id: 316112,
+ iid: 1,
+ project: project,
+ user: user,
+ duration: 10,
+ finished_at: '2022-06-01T02:47:31.432Z',
+ builds: [scheduled_job, manual_job]
+ )
+ end
+ end
+end