Sha256: d06dbe4234f44d9a24e8ace458c4303627f87dd73535a84a6c03e3a8f5e49ffd
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
require File.dirname(__FILE__) + "/spec_helper" describe "Transporter creating transactions" do it "should raise an exception when transport_type is not one of :json, :rest or :soap" do lambda { tr = ::EWS::Transporter.new(LOCATION) tr.submit(basic_new_transaction, :banana) }.should raise_error end it "should not throw errors" do txn = basic_new_transaction lambda { tr = ::EWS::Transporter.new(LOCATION) tr.submit(txn) }.should_not raise_error(RuntimeError) end it "should return a Response object on server failure" do req = basic_find_transaction req.transaction_tag = 9000 # non-existent txn puts req.errors.inspect unless req.valid? tr = ::EWS::Transporter.new(LOCATION) resp = tr.submit(req, :json) resp.should_not be_nil resp.error_number.should == 404 resp.error_description.should == "Not Found" end it "should throw an exception when parsing a response to sending nonsense SOAP" do req = basic_find_transaction EWS::Transaction::Mapping.stubs(:request_to_soap).returns("Complete and utter rubbish. It's not even XML!!") tr = ::EWS::Transporter.new(LOCATION) lambda { tr.submit(req, :soap) }.should raise_error end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
exact4r-0.6 | ./spec/transporter_spec.rb |