test/unit/oauth_test.rb in xeroizer-2.15.6 vs test/unit/oauth_test.rb in xeroizer-2.15.7

- old
+ new

@@ -73,20 +73,20 @@ @client.Organisation.first end end should "handle ApiExceptions" do - Xeroizer::OAuth.any_instance.stubs(:post).returns(stub(:plain_body => get_file_as_string("api_exception.xml"), + Xeroizer::OAuth.any_instance.stubs(:put).returns(stub(:plain_body => get_file_as_string("api_exception.xml"), :code => "400")) assert_raises Xeroizer::ApiException do contact = @client.Contact.build(:name => 'Test Contact') contact.save end end should "handle random root elements" do - Xeroizer::OAuth.any_instance.stubs(:post).returns(stub(:plain_body => "<RandomRootElement></RandomRootElement>", + Xeroizer::OAuth.any_instance.stubs(:put).returns(stub(:plain_body => "<RandomRootElement></RandomRootElement>", :code => "200")) assert_raises Xeroizer::UnparseableResponse do contact = @client.Contact.build(:name => 'Test Contact') contact.save