import_url_spec.rb 583 Bytes
Newer Older
James Lopez's avatar
James Lopez committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'spec_helper'

describe Gitlab::ImportUrl do

  let(:credentials) { { user: 'blah', password: 'password' } }
  let(:import_url) do
    Gitlab::ImportUrl.new("https://github.com/me/project.git", credentials: credentials)
  end

  describe :full_url do
    it { expect(import_url.full_url).to eq("https://blah:password@github.com/me/project.git") }
  end

  describe :sanitized_url do
    it { expect(import_url.sanitized_url).to eq("https://github.com/me/project.git") }
  end

  describe :credentials do
    it { expect(import_url.credentials).to eq(credentials) }
  end
end