提交 a265f676 编写于 作者: C Craig Davison

Add test for --ff merge

上级 565c604f
......@@ -83,6 +83,32 @@ Feature: hub merge
Fast-forward (no commit created; -m option ignored)
"""
Scenario: Merge pull request with --ff option
Given the GitHub API server:
"""
require 'json'
get('/repos/defunkt/hub/pulls/164') { json \
:head => {
:ref => "hub_merge",
:repo => {
:owner => { :login => "jfirebaugh" },
:name => "hub",
:private => false
}
},
:title => "Add `hub merge` command"
}
"""
And there is a commit named "jfirebaugh/hub_merge"
When I successfully run `hub merge --ff https://github.com/defunkt/hub/pull/164`
Then "git fetch git://github.com/jfirebaugh/hub.git +refs/heads/hub_merge:refs/remotes/jfirebaugh/hub_merge" should be run
And "git merge --ff jfirebaugh/hub_merge -m Merge pull request #164 from jfirebaugh/hub_merge" should be run
When I successfully run `git show -s --format=%B`
Then the output should contain:
"""
Fast-forward (no commit created; -m option ignored)
"""
Scenario: Merge private pull request
Given the GitHub API server:
"""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册