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

import_url_spec.rb « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f758cb8693c45f1e9e01a4ab18f6f0ed63288ccb (plain)
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