summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-27 15:25:26 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-27 15:25:26 +0000
commit88725a6b87961c5f3052259f84208a6ccb943b34 (patch)
tree0d9a3366e66c03f74eba1f8ae2c4fb81912aa3bc /spec
parented98b14d6293807e32a708faa5e33d2b5bb35282 (diff)
downloadgitlab-ce-88725a6b87961c5f3052259f84208a6ccb943b34.tar.gz
Add latest changes from gitlab-org/security/gitlab@12-10-stable-ee
Diffstat (limited to 'spec')
-rw-r--r--spec/serializers/remote_mirror_entity_spec.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/serializers/remote_mirror_entity_spec.rb b/spec/serializers/remote_mirror_entity_spec.rb
index 5f4aac213be..27472c46436 100644
--- a/spec/serializers/remote_mirror_entity_spec.rb
+++ b/spec/serializers/remote_mirror_entity_spec.rb
@@ -3,7 +3,7 @@
require 'spec_helper'
describe RemoteMirrorEntity do
- let(:project) { create(:project, :repository, :remote_mirror) }
+ let(:project) { create(:project, :repository, :remote_mirror, url: "https://test:password@gitlab.com") }
let(:remote_mirror) { project.remote_mirrors.first }
let(:entity) { described_class.new(remote_mirror) }
@@ -15,4 +15,9 @@ describe RemoteMirrorEntity do
:ssh_known_hosts, :ssh_public_key, :ssh_known_hosts_fingerprints
)
end
+
+ it 'does not expose password information' do
+ expect(subject[:url]).not_to include('password')
+ expect(subject[:url]).to eq(remote_mirror.safe_url)
+ end
end