debian-mirror-gitlab/spec/contracts/provider/states/project/pipelines/new_state.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
639 B
Ruby
Raw Normal View History

2022-08-27 11:52:29 +05:30
# 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