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

wiki_formatter_spec.rb « github_import « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1bd29b8a563f3c71b4f335c64f8b7d06cfcf0800 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'spec_helper'

describe Gitlab::GithubImport::WikiFormatter, lib: true do
  let(:project) do
    create(:project,
           namespace: create(:namespace, path: 'gitlabhq'),
           import_url: 'https://xxx@github.com/gitlabhq/sample.gitlabhq.git')
  end

  subject(:wiki) { described_class.new(project) }

  describe '#path_with_namespace' do
    it 'appends .wiki to project path' do
      expect(wiki.path_with_namespace).to eq 'gitlabhq/gitlabhq.wiki'
    end
  end

  describe '#import_url' do
    it 'returns URL of the wiki repository' do
      expect(wiki.import_url).to eq 'https://xxx@github.com/gitlabhq/sample.gitlabhq.wiki.git'
    end
  end
end