diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-01-07 02:15:37 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-01-14 17:09:31 +0300 |
commit | 78f5eb94fb15f7e4cc4208a4871b9533243bec40 (patch) | |
tree | 965481f168a3c07b3f3800045c05b034a5a38e69 /spec | |
parent | e47f0e563d127f593f16c0a521c836e21bceb77f (diff) |
Import GitHub wiki into GitLab
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/github_import/wiki_formatter_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/lib/gitlab/github_import/wiki_formatter_spec.rb b/spec/lib/gitlab/github_import/wiki_formatter_spec.rb new file mode 100644 index 00000000000..a4ef7b60ae1 --- /dev/null +++ b/spec/lib/gitlab/github_import/wiki_formatter_spec.rb @@ -0,0 +1,22 @@ +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/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/gitlabhq.wiki.git' + end + end +end |