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
Loading
@@ -12,7 +12,7 @@ module Gitlab
end
 
def import_url
project.import_url.sub(".git", ".wiki.git")
project.import_url.sub(/\.git\z/, ".wiki.git")
end
end
end
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@ 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')
import_url: 'https://xxx@github.com/gitlabhq/sample.gitlabhq.git')
end
 
subject(:wiki) { described_class.new(project)}
Loading
Loading
@@ -16,7 +16,7 @@ describe Gitlab::GithubImport::WikiFormatter, lib: true do
 
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'
expect(wiki.import_url).to eq 'https://xxx@github.com/gitlabhq/sample.gitlabhq.wiki.git'
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