Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (28 sloc) 0.726 kb
require File.expand_path('../helper', __FILE__)
class ZohoProjectsTest < Service::TestCase
def setup
@stubs = Faraday::Adapter::Test::Stubs.new
end
def data
{
"project_id" => "1234",
"token" => "a13d",
}
end
def test_push
url = "/serviceHook"
@stubs.post url do |env|
assert_equal 'projects.zoho.com', env[:url].host
params = Rack::Utils.parse_query env[:body]
assert_equal '1234', params['pId']
assert_equal 'a13d', params['authtoken']
assert_equal payload, JSON.parse(params['payload'])
[200, {}, '']
end
svc = service :push, data, payload
svc.receive
end
def service(*args)
super Service::ZohoProjects, *args
end
end
Jump to Line
Something went wrong with that request. Please try again.