Sha256: c46b13fb0aececb549a53b4ca994e5ecdd0064691690e6d39634973e02ee1997
Contents?: true
Size: 1.14 KB
Versions: 1
Compression:
Stored size: 1.14 KB
Contents
# -*- encoding: utf-8 -*- require 'helper' describe Octokit::Client::Pulls do before do @client = Octokit::Client.new(:login => 'sferik') end describe ".create_pull_request" do it "should create a pull request" do stub_post("pulls/sferik/rails_admin"). with(:pull => {:base => "master", :head => "pengwynn:master", :title => "Title", :body => "Body"}). to_return(:body => fixture("v2/pulls.json")) issues = @client.create_pull_request("sferik/rails_admin", "master", "pengwynn:master", "Title", "Body") issues.first.number.should == 251 end end describe ".pull_requests" do it "should return all pull requests" do stub_get("pulls/sferik/rails_admin/open"). to_return(:body => fixture("v2/pulls.json")) pulls = @client.pulls("sferik/rails_admin") pulls.first.number.should == 251 end end describe ".pull_request" do it "should return a pull request" do stub_get("pulls/sferik/rails_admin/251"). to_return(:body => fixture("v2/pull.json")) pull = @client.pull("sferik/rails_admin", 251) pull.number.should == 251 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
octokit-0.6.3 | spec/octokit/client/pulls_spec.rb |