Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-05-30 21:47:55 +0300
committerDouwe Maan <douwe@gitlab.com>2017-05-30 21:47:55 +0300
commit8039b9c3c6caedc19e0e44d086a007e8975134b7 (patch)
tree859d1a25b2bbb17920315482a8ef4d85369fb936 /spec/lib
parentc5e26e57282f8e9423c9281196e4bf317887d68e (diff)
parent08134ad2909c4497dc5ef0e4b144ccc6330a9de8 (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.rb9
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") }