Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Clean up options

  • Loading branch information...
commit 2714851ca81fd8b84d5379b65f3e61758a831241 1 parent 2647d13
@arsduo authored
View
5 lib/batch_api/configuration.rb
@@ -8,10 +8,7 @@ module BatchApi
# - verb: through which it's accessed (default "POST")
# - limit: how many requests can be processed in a single request
# (default 50)
- # - decode_json_responses: automatically decode JSON response bodies,
- # so they don't get double-decoded (e.g. when you decode the batch
- # response, the bodies are already objects).
- #
+ #
# There are also two middleware-related options -- check out middleware.rb
# for more information.
# - global_middleware: any middlewares to use round the entire batch request
View
10 spec/integration/shared_examples.rb
@@ -201,15 +201,7 @@ def headerize(hash)
@result = JSON.parse(response.body)["results"][1]
end
- it "returns the body raw if decode_json_responses = false" do
- # BatchApi.config.decode_bodies = false
- xhr :post, "/batch", {ops: [post_request], sequential: true}.to_json,
- "CONTENT_TYPE" => "application/json"
- @result = JSON.parse(response.body)["results"][0]
- @result["body"].should == JSON.parse(post_result[:body].to_json)
- end
-
- it "returns the body as objects if decode_json_responses = true" do
+ it "returns the body as objects (since DecodeJsonBody is default)" do
@result["body"].should == post_result[:body]
end

0 comments on commit 2714851

Please sign in to comment.
Something went wrong with that request. Please try again.