Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (19 sloc) 0.521 kB
require File.expand_path('../helper', __FILE__)
class GeoCommitTest < Service::TestCase
def setup
@stubs = Faraday::Adapter::Test::Stubs.new
end
def test_push
svc = service({}, 'a' => 1)
@stubs.post "/api/github" do |env|
assert_equal 'application/githubpostreceive+json',
env[:request_headers]['Content-Type']
assert_equal 1, JSON.parse(env[:body])['a']
[200, {}, '']
end
svc.receive_push
end
def service(*args)
super Service::GeoCommit, *args
end
end
Jump to Line
Something went wrong with that request. Please try again.