diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-05-30 21:47:55 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-05-30 21:47:55 +0300 |
commit | 8039b9c3c6caedc19e0e44d086a007e8975134b7 (patch) | |
tree | 859d1a25b2bbb17920315482a8ef4d85369fb936 /spec/lib | |
parent | c5e26e57282f8e9423c9281196e4bf317887d68e (diff) | |
parent | 08134ad2909c4497dc5ef0e4b144ccc6330a9de8 (diff) |
Merge branch '30410-revert-9347-and-10079' into 'master'
Resolve "Allow to disable username on checkout url"
Closes #30410 and #30174
See merge request !11792
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/url_sanitizer_spec.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/spec/lib/gitlab/url_sanitizer_spec.rb b/spec/lib/gitlab/url_sanitizer_spec.rb index fc144a2556a..6bce724a3f6 100644 --- a/spec/lib/gitlab/url_sanitizer_spec.rb +++ b/spec/lib/gitlab/url_sanitizer_spec.rb @@ -62,11 +62,6 @@ describe Gitlab::UrlSanitizer, lib: true do end end - describe '.http_credentials_for_user' do - it { expect(described_class.http_credentials_for_user(user)).to eq({ user: 'john.doe' }) } - it { expect(described_class.http_credentials_for_user('foo')).to eq({}) } - end - describe '#sanitized_url' do it { expect(url_sanitizer.sanitized_url).to eq("https://github.com/me/project.git") } end @@ -76,7 +71,7 @@ describe Gitlab::UrlSanitizer, lib: true do context 'when user is given to #initialize' do let(:url_sanitizer) do - described_class.new("https://github.com/me/project.git", credentials: described_class.http_credentials_for_user(user)) + described_class.new("https://github.com/me/project.git", credentials: { user: user.username }) end it { expect(url_sanitizer.credentials).to eq({ user: 'john.doe' }) } @@ -94,7 +89,7 @@ describe Gitlab::UrlSanitizer, lib: true do context 'when user is given to #initialize' do let(:url_sanitizer) do - described_class.new("https://github.com/me/project.git", credentials: described_class.http_credentials_for_user(user)) + described_class.new("https://github.com/me/project.git", credentials: { user: user.username }) end it { expect(url_sanitizer.full_url).to eq("https://john.doe@github.com/me/project.git") } |