mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Accept github theme urls with a trailing slash
This commit is contained in:
@@ -10,6 +10,7 @@ describe ThemeStore::GitImporter do
|
||||
context "#import" do
|
||||
|
||||
let(:url) { "https://github.com/example/example.git" }
|
||||
let(:trailing_slash_url) { "https://github.com/example/example/" }
|
||||
let(:ssh_url) { "git@github.com:example/example.git" }
|
||||
let(:branch) { "dev" }
|
||||
|
||||
@@ -27,6 +28,13 @@ describe ThemeStore::GitImporter do
|
||||
importer.import!
|
||||
end
|
||||
|
||||
it "should work with trailing slash url" do
|
||||
Discourse::Utils.expects(:execute_command).with("git", "clone", url, @temp_folder)
|
||||
|
||||
importer = ThemeStore::GitImporter.new(trailing_slash_url)
|
||||
importer.import!
|
||||
end
|
||||
|
||||
it "should import from ssh url" do
|
||||
Discourse::Utils.expects(:execute_command).with({
|
||||
'GIT_SSH_COMMAND' => "ssh -i #{@ssh_folder}/id_rsa -o StrictHostKeyChecking=no"
|
||||
|
||||
Reference in New Issue
Block a user