diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-06 03:09:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-06 03:09:08 +0300 |
commit | 1acb6e46feb8e564232282a08acccd394334c185 (patch) | |
tree | d23b5a620fdd4ec633aae6ac88c41207a4ce6c82 /spec/contracts/provider | |
parent | b54ba745ea5268221b493e0a4349fd75a042e20c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/contracts/provider')
-rw-r--r-- | spec/contracts/provider/pact_helpers/project/pipeline_schedule/update_pipeline_schedule_helper.rb | 16 | ||||
-rw-r--r-- | spec/contracts/provider/states/project/pipeline_schedule/edit_state.rb | 15 |
2 files changed, 31 insertions, 0 deletions
diff --git a/spec/contracts/provider/pact_helpers/project/pipeline_schedule/update_pipeline_schedule_helper.rb b/spec/contracts/provider/pact_helpers/project/pipeline_schedule/update_pipeline_schedule_helper.rb new file mode 100644 index 00000000000..a83aa9524dc --- /dev/null +++ b/spec/contracts/provider/pact_helpers/project/pipeline_schedule/update_pipeline_schedule_helper.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +require_relative '../../../spec_helper' +require_relative '../../../states/project/pipeline_schedule/edit_state' + +module Provider + module CreateNewPipelineHelper + Pact.service_provider "PUT Edit a pipeline schedule" do + app { Environments::Test.app } + + honours_pact_with 'PipelineSchedule#edit' do + pact_uri '../contracts/project/pipeline_schedule/edit/pipelineschedules#edit-put_edit_a_pipeline_schedule.json' + end + end + end +end diff --git a/spec/contracts/provider/states/project/pipeline_schedule/edit_state.rb b/spec/contracts/provider/states/project/pipeline_schedule/edit_state.rb new file mode 100644 index 00000000000..4ee714f15f3 --- /dev/null +++ b/spec/contracts/provider/states/project/pipeline_schedule/edit_state.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +Pact.provider_states_for "PipelineSchedules#edit" do + provider_state "a project with a pipeline schedule 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) + + project.add_maintainer(user) + + create(:ci_pipeline_schedule, id: 25, project: project, owner: user) + end + end +end |