gitlab-org--gitlab-foss/spec/lib/gitlab/legacy_github_import/wiki_formatter_spec.rb

32 lines
819 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2016-01-06 23:15:37 +00:00
require 'spec_helper'
RSpec.describe Gitlab::LegacyGithubImport::WikiFormatter do
2016-01-06 23:15:37 +00:00
let(:project) do
create(:project,
2016-03-21 16:29:19 +00:00
namespace: create(:namespace, path: 'gitlabhq'),
2016-03-21 14:11:05 +00:00
import_url: 'https://xxx@github.com/gitlabhq/sample.gitlabhq.git')
2016-03-04 17:37:00 +00:00
end
subject(:wiki) { described_class.new(project) }
2016-01-06 23:15:37 +00:00
describe '#disk_path' do
it 'appends .wiki to disk path' do
2017-10-18 11:53:06 +00:00
expect(wiki.disk_path).to eq project.wiki.disk_path
2016-01-06 23:15:37 +00:00
end
end
describe '#full_path' do
it 'appends .wiki to project path' do
expect(wiki.full_path).to eq project.wiki.full_path
end
end
2016-01-06 23:15:37 +00:00
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'
2016-01-06 23:15:37 +00:00
end
end
end