Skip to content
Snippets Groups Projects
Commit 89e8b82b authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Make sure the .git is at the end on Gitlab::GithubImport::WikiFormatter

parent ca87bb65
No related branches found
No related tags found
No related merge requests found
Loading
@@ -12,7 +12,7 @@ module Gitlab
Loading
@@ -12,7 +12,7 @@ module Gitlab
end end
   
def import_url def import_url
project.import_url.sub(".git", ".wiki.git") project.import_url.sub(/\.git\z/, ".wiki.git")
end end
end end
end end
Loading
Loading
Loading
@@ -3,7 +3,7 @@ require 'spec_helper'
Loading
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Gitlab::GithubImport::WikiFormatter, lib: true do describe Gitlab::GithubImport::WikiFormatter, lib: true do
let(:project) do let(:project) do
create(:project, namespace: create(:namespace, path: 'gitlabhq'), create(:project, namespace: create(:namespace, path: 'gitlabhq'),
import_url: 'https://xxx@github.com/gitlabhq/gitlabhq.git') import_url: 'https://xxx@github.com/gitlabhq/sample.gitlabhq.git')
end end
   
subject(:wiki) { described_class.new(project)} subject(:wiki) { described_class.new(project)}
Loading
@@ -16,7 +16,7 @@ describe Gitlab::GithubImport::WikiFormatter, lib: true do
Loading
@@ -16,7 +16,7 @@ describe Gitlab::GithubImport::WikiFormatter, lib: true do
   
describe '#import_url' do describe '#import_url' do
it 'returns URL of the wiki repository' do it 'returns URL of the wiki repository' do
expect(wiki.import_url).to eq 'https://xxx@github.com/gitlabhq/gitlabhq.wiki.git' expect(wiki.import_url).to eq 'https://xxx@github.com/gitlabhq/sample.gitlabhq.wiki.git'
end end
end end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment