test/salesforce/connection/async_test.rb in activeforce-1.7.1 vs test/salesforce/connection/async_test.rb in activeforce-1.8.0
- old
+ new
@@ -14,10 +14,10 @@
http_body = stub(:body => { :result => 'foo' }.to_json)
RestClient.expects(:post).with('https://.salesforce.com/services/async/22.0/path', :body, {'X-SFDC-Session' => 'session_id', :content_type => 'application/json'}).returns(http_body)
assert_equal({'result' => 'foo'}, Salesforce.connection.async_post('path', :body, :format => :json))
end
- def test_async_post__400_error_json
+ def test_async_post__404_error_json
Salesforce::Authentication.stubs(:session_id).returns('session_id')
error = RestClient::BadRequest.new
error.stubs(:http_body).returns("[{\"message\":\"someproblem\",\"errorCode\":\"MALFORMED_QUERY\"}]")
RestClient.stubs(:post).raises(error)
begin