未验证 提交 81c4f073 编写于 作者: M Mislav Marohnić 提交者: GitHub

Fix `hub create -p` test for private/public repos

上级 8ab3b336
......@@ -150,9 +150,8 @@ Feature: hub create
Given the GitHub API server:
"""
get('/repos/mislav/dotfiles') {
status 200
json :private => false
json :full_name => 'mislav/dotfiles'
json :full_name => 'mislav/dotfiles',
:private => false
}
"""
When I run `hub create -p`
......@@ -160,6 +159,17 @@ Feature: hub create
And the exit status should be 1
And there should be no "origin" remote
Scenario: GitHub repo already exists and is private
Given the GitHub API server:
"""
get('/repos/mislav/dotfiles') {
json :full_name => 'mislav/dotfiles',
:private => true
}
"""
When I successfully run `hub create -p`
Then the url for "origin" should be "git@github.com:mislav/dotfiles.git"
Scenario: API response changes the clone URL
Given the GitHub API server:
"""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册