diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-02-14 00:59:38 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-02-14 01:39:59 +0800 |
commit | 305c8751c2845dc9c96f654579c7c9063c760534 (patch) | |
tree | b0f52826df9ce6360dfa57a5715e8f78db395d60 /qa | |
parent | 58d1ad56f398dd847b75f54b1a84a86d6d10ba0a (diff) | |
download | gitlab-ce-305c8751c2845dc9c96f654579c7c9063c760534.tar.gz |
Fix the use to Git::Location
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/project/show.rb | 2 | ||||
-rw-r--r-- | qa/spec/git/location_spec.rb | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/qa/qa/page/project/show.rb b/qa/qa/page/project/show.rb index 8d4a8c51184..b603557f59c 100644 --- a/qa/qa/page/project/show.rb +++ b/qa/qa/page/project/show.rb @@ -37,7 +37,7 @@ module QA end def repository_location_uri - Git::Repository::Location.parse(repository_location) + Git::Location.new(repository_location) end def project_name diff --git a/qa/spec/git/location_spec.rb b/qa/spec/git/location_spec.rb index 4c68a0cda61..aef906ee836 100644 --- a/qa/spec/git/location_spec.rb +++ b/qa/spec/git/location_spec.rb @@ -1,10 +1,10 @@ describe QA::Git::Location do - describe '.parse' do + describe '.new' do context 'when URI starts with ssh://' do context 'when URI has port' do it 'parses correctly' do uri = described_class - .parse('ssh://git@qa.test:2222/sandbox/qa/repo.git') + .new('ssh://git@qa.test:2222/sandbox/qa/repo.git') expect(uri.user).to eq('git') expect(uri.host).to eq('qa.test') @@ -16,7 +16,7 @@ describe QA::Git::Location do context 'when URI does not have port' do it 'parses correctly' do uri = described_class - .parse('ssh://git@qa.test/sandbox/qa/repo.git') + .new('ssh://git@qa.test/sandbox/qa/repo.git') expect(uri.user).to eq('git') expect(uri.host).to eq('qa.test') @@ -30,7 +30,7 @@ describe QA::Git::Location do context 'when host does not have colons' do it 'parses correctly' do uri = described_class - .parse('git@qa.test:sandbox/qa/repo.git') + .new('git@qa.test:sandbox/qa/repo.git') expect(uri.user).to eq('git') expect(uri.host).to eq('qa.test') @@ -42,7 +42,7 @@ describe QA::Git::Location do context 'when host has a colon' do it 'parses correctly' do uri = described_class - .parse('[git@qa:test]:sandbox/qa/repo.git') + .new('[git@qa:test]:sandbox/qa/repo.git') expect(uri.user).to eq('git') expect(uri.host).to eq('qa%3Atest') |