forked from pingcap/discourse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: Accept github theme urls with a trailing slash
- Loading branch information
1 parent
9585a16
commit 0508546
Showing
2 changed files
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
context "#import" do | ||
|
||
let(:url) { "https://github.com/example/example.git" } | ||
let(:trailing_slash_url) { "https://github.com/example/example/" } | ||
let(:ssh_url) { "[email protected]:example/example.git" } | ||
let(:branch) { "dev" } | ||
|
||
|
@@ -27,6 +28,13 @@ | |
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" | ||
|