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 ...@@ -217,6 +217,10 @@ module QA
"#{api_get_path}/wikis" "#{api_get_path}/wikis"
end end
def api_push_rules_path
"#{api_get_path}/push_rule"
end
def api_post_body def api_post_body
post_body = { post_body = {
name: name, name: name,
...@@ -361,6 +365,15 @@ module QA ...@@ -361,6 +365,15 @@ module QA
parse_body(response) parse_body(response)
end 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 # Object comparison
# #
# @param [QA::Resource::Project] other # @param [QA::Resource::Project] other
......
...@@ -33,6 +33,7 @@ module QA ...@@ -33,6 +33,7 @@ module QA
Resource::Project.fabricate_via_api! do |project| Resource::Project.fabricate_via_api! do |project|
project.api_client = api_client project.api_client = api_client
project.group = source_group project.group = source_group
project.initialize_with_readme = true
end end
end end
...@@ -60,7 +61,7 @@ module QA ...@@ -60,7 +61,7 @@ module QA
sandbox.add_member(user, Resource::Members::AccessLevel::MAINTAINER) 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 end
after do 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