debian-mirror-gitlab/spec/lib/gitlab/legacy_github_import/wiki_formatter_spec.rb

32 lines
813 B
Ruby
Raw Normal View History

2019-12-04 20:38:33 +05:30
# frozen_string_literal: true
require 'spec_helper'
2018-03-17 18:26:18 +05:30
describe Gitlab::LegacyGithubImport::WikiFormatter do
let(:project) do
2016-06-02 11:05:42 +05:30
create(:project,
namespace: create(:namespace, path: 'gitlabhq'),
import_url: 'https://xxx@github.com/gitlabhq/sample.gitlabhq.git')
end
2016-06-02 11:05:42 +05:30
subject(:wiki) { described_class.new(project) }
2017-09-10 17:25:29 +05:30
describe '#disk_path' do
2019-03-02 22:35:43 +05:30
it 'appends .wiki to disk path' do
2018-03-17 18:26:18 +05:30
expect(wiki.disk_path).to eq project.wiki.disk_path
end
end
2019-03-02 22:35:43 +05:30
describe '#full_path' do
it 'appends .wiki to project path' do
expect(wiki.full_path).to eq project.wiki.full_path
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