Commit fc5756ea authored by Andrejs Cunskis's avatar Andrejs Cunskis

Create project with push rules for import spec

parent 57b6e1f6
......@@ -217,6 +217,10 @@ module QA
"#{api_get_path}/wikis"
end
def api_push_rules_path
"#{api_get_path}/push_rule"
end
def api_post_body
post_body = {
name: name,
......@@ -361,6 +365,15 @@ module QA
parse_body(response)
end
def push_rules
response = get(request_url(api_push_rules_path))
parse_body(response)
end
def add_push_rules(rules)
api_post_to(api_push_rules_path, rules)
end
# Object comparison
#
# @param [QA::Resource::Project] other
......
......@@ -33,6 +33,7 @@ module QA
Resource::Project.fabricate_via_api! do |project|
project.api_client = api_client
project.group = source_group
project.initialize_with_readme = true
end
end
......@@ -60,7 +61,7 @@ module QA
sandbox.add_member(user, Resource::Members::AccessLevel::MAINTAINER)
source_project # fabricate source group and project
source_project.tap { |project| project.add_push_rules(member_check: true) } # fabricate source group and project
end
after do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment