Commit 73f5b02b authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Change the force flag to a keyword argument

parent 4b779c77aa84
...@@ -1073,7 +1073,7 @@ def origin_merge_requests ...@@ -1073,7 +1073,7 @@ def origin_merge_requests
merge_requests.where(source_project_id: self.id) merge_requests.where(source_project_id: self.id)
end end
def create_repository(force = false) def create_repository(force: false)
# Forked import is handled asynchronously # Forked import is handled asynchronously
return if forked? && !force return if forked? && !force
...@@ -1087,7 +1087,7 @@ def create_repository(force = false) ...@@ -1087,7 +1087,7 @@ def create_repository(force = false)
end end
def ensure_repository def ensure_repository
create_repository(true) unless repository_exists? create_repository(force: true) unless repository_exists?
end end
def repository_exists? def repository_exists?
......
...@@ -1344,7 +1344,7 @@ def create_pipeline ...@@ -1344,7 +1344,7 @@ def create_pipeline
.with(project.repository_storage_path, project.path_with_namespace) .with(project.repository_storage_path, project.path_with_namespace)
.and_return(true) .and_return(true)
expect(project).to receive(:create_repository) expect(project).to receive(:create_repository).with(force: true)
project.ensure_repository project.ensure_repository
end end
......
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