BigW Consortium Gitlab

wiki_formatter_spec.rb 670 Bytes
Newer Older
1 2 3 4
require 'spec_helper'

describe Gitlab::GithubImport::WikiFormatter, lib: true do
  let(:project) do
5 6
    create(:project,
           namespace: create(:namespace, path: 'gitlabhq'),
James Lopez committed
7
           import_url: 'https://xxx@github.com/gitlabhq/sample.gitlabhq.git')
James Lopez committed
8 9 10
  end

  subject(:wiki) { described_class.new(project) }
11 12 13 14 15 16 17 18 19

  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
20
      expect(wiki.import_url).to eq 'https://xxx@github.com/gitlabhq/sample.gitlabhq.wiki.git'
21 22 23
    end
  end
end