debian-mirror-gitlab/spec/contracts/provider/states/project/pipelines/new_state.rb
2023-03-04 22:38:38 +05:30

24 lines
639 B
Ruby

# frozen_string_literal: true
Pact.provider_states_for "Pipelines#new" do
provider_state "a project with a valid .gitlab-ci.yml configuration exists" do
set_up do
user = User.find_by(name: Provider::UsersHelper::CONTRACT_USER_NAME)
namespace = create(:namespace, name: 'gitlab-org')
project = create(
:project,
:custom_repo,
name: 'gitlab-qa',
namespace: namespace,
creator: user,
files: {
'.gitlab-ci.yml' => <<~YAML
test-success:
script: echo 'OK'
YAML
})
project.add_maintainer(user)
end
end
end