Sha256: 3bdaad06ee581da5ff276deb28e2c27a54e3fb3a5ef4e650fb95b55a99f4ec11
Contents?: true
Size: 1.1 KB
Versions: 3
Compression:
Stored size: 1.1 KB
Contents
require 'spec_helper' describe Trebbianno::Request do before do @client = Trebbianno::Client.new("the_username", "the_password") end describe '#construct_xml' do it 'should build the main xml with header, user, and supplied body' do request_type = "new_order_request" soap_client = Trebbianno::Request.new(@client) soap_request = soap_client.construct_xml request_type do |xml| xml.test "test" end soap_request.should == xml_string(request_type, "<test>test</test>") end end describe '#build_header' do it 'should build xml header' do request_type = "new_order_request" soap_client = Trebbianno::Request.new(@client) xml = Builder::XmlMarkup.new soap_request = soap_client.build_header(xml, request_type) soap_request.should == xml_header_string(request_type) end end describe '#build_user' do it 'should' do soap_client = Trebbianno::Request.new(@client) xml = Builder::XmlMarkup.new soap_request = soap_client.build_user(xml) soap_request.should == xml_user_string end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
trebbianno-ruby-api-0.0.3 | spec/lib/soap_spec.rb |
trebbianno-ruby-api-0.0.2 | spec/lib/soap_spec.rb |
trebbianno-ruby-api-0.0.1 | spec/lib/soap_spec.rb |