Permalink
Browse files

update pull-merged? method to reflect GET request from Github API doc…

…umentation
  • Loading branch information...
1 parent de6019e commit 4c9aa88b373302baa350beae70d7378533892241 @kevinmcnamee kevinmcnamee committed Nov 29, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/octokit/client/pulls.rb
  2. +1 −1 spec/octokit/client/pulls_spec.rb
View
2 lib/octokit/client/pulls.rb
@@ -236,7 +236,7 @@ def merge_pull_request(repo, number, commit_message='', options={})
# @return [Boolean] True if the pull request has been merged
def pull_merged?(repo, number, options={})
begin
- get("repos/#{Repository.new(repo)}/pulls/#{number}/merged", options)
+ get("repos/#{Repository.new(repo)}/pulls/#{number}/merge", options)
return true
rescue Octokit::NotFound
return false
View
2 spec/octokit/client/pulls_spec.rb
@@ -189,7 +189,7 @@
describe ".pull_merged?" do
it "returns whether the pull request has been merged" do
- stub_get("https://api.github.com/repos/pengwynn/octokit/pulls/67/merged").
+ stub_get("https://api.github.com/repos/pengwynn/octokit/pulls/67/merge").
to_return(:status => 204)
merged = @client.pull_merged?("pengwynn/octokit", 67)
expect(merged).to be_true

0 comments on commit 4c9aa88

Please sign in to comment.