Read about our upcoming Code of Conduct on this issue

Commit 33486dd9 authored by Ash McKenzie's avatar Ash McKenzie
Browse files

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 a13d2c1c0f93
......@@ -1140,6 +1140,11 @@ def http_url_to_repo
"#{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 @@ def enable_lfs
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