Commit 21014c59 authored by Ash McKenzie's avatar Ash McKenzie

Add Project#lfs_http_url_to_repo from EE

For CE, #lfs_http_url_to_repo calls #http_url_to_repo where as for EE we
examine for a Geo setup so we can support push to secondary for LFS.
parent 1beb7ffc
......@@ -1140,6 +1140,11 @@ class Project < ActiveRecord::Base
"#{web_url}.git"
end
# Is overriden in EE
def lfs_http_url_to_repo(_)
http_url_to_repo
end
def forked?
fork_network && fork_network.root_project != self
end
......
......@@ -2710,6 +2710,17 @@ describe Project do
end
end
describe '#lfs_http_url_to_repo' do
let(:project) { create(:project) }
it 'returns the url to the repo without a username' do
lfs_http_url_to_repo = project.lfs_http_url_to_repo('operation_that_doesnt_matter')
expect(lfs_http_url_to_repo).to eq("#{project.web_url}.git")
expect(lfs_http_url_to_repo).not_to include('@')
end
end
describe '#pipeline_status' do
let(:project) { create(:project, :repository) }
it 'builds a pipeline status' 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