Sha256: e54ada738318a053ad2b2c2416a6eb5c0ccd95e9a5c778e42ae63b1d9cd41b85
Contents?: true
Size: 675 Bytes
Versions: 5
Compression:
Stored size: 675 Bytes
Contents
require './test/test_helper' require 'zoro/api' describe Zoro::Api do it "can format the URL to insert lead records" do Zoro.auth_token = "1234" api = Zoro::Api.new url = api.format_url("Leads", "insertRecords") url.must_equal "https://crm.zoho.com/crm/private/xml/Leads/insertRecords" end it "can insert records into the zoro CRM" do #Stub HTTP Zoro.auth_token = "1234" stubs = stub_http stubs.get("/crm/private/xml/Leads/insertRecords") {[200, {}, 'foo']} record = stub(:zoho_module => "Leads", :to_xml => '<somexml>foo</somexml>') api = Zoro::Api.new api.insert_records(record) stubs.verify_stubbed_calls end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
zoro-0.0.5 | test/zoro/api_test.rb |
zoro-0.0.4 | test/zoro/api_test.rb |
zoro-0.0.3 | test/zoro/api_test.rb |
zoro-0.0.2 | test/zoro/api_test.rb |
zoro-0.0.1 | test/zoro/api_test.rb |