summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-03-07 12:50:35 +0100
committerJames Lopez <james@jameslopez.es>2016-03-07 12:50:35 +0100
commit735563329d1f86ee4d72b37cd22eed1168935e8e (patch)
tree71f2354eeab407a06101dbf96696a72475d35727 /spec
parent7085850c50a6dd7072bd2c80f092b0c20f74d1dc (diff)
downloadgitlab-ce-735563329d1f86ee4d72b37cd22eed1168935e8e.tar.gz
refactored a bunch of stuff based on MR feedback
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/import_url_exposer_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/lib/gitlab/import_url_exposer_spec.rb b/spec/lib/gitlab/import_url_exposer_spec.rb
new file mode 100644
index 00000000000..878947caea1
--- /dev/null
+++ b/spec/lib/gitlab/import_url_exposer_spec.rb
@@ -0,0 +1,13 @@
+require 'spec_helper'
+
+describe 'Gitlab::ImportUrlExposer' do
+
+ describe :expose do
+ let(:credentials) do
+ Gitlab::ImportUrlExposer.expose(import_url: "https://github.com/me/project.git", credentials: {user: 'blah', password: 'password'})
+ end
+
+ it { expect(credentials).to be_a(URI) }
+ it { expect(credentials.to_s).to eq("https://blah:password@github.com/me/project.git") }
+ end
+end