Created
July 31, 2008 20:53
-
-
Save mlangenberg/3526 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mlangenberg-mbp:merb-core mlangenberg$ git diff | |
diff --git a/spec/public/request/request_spec.rb b/spec/public/request/request_spec.rb | |
index 0486a07..4bd3053 100644 | |
--- a/spec/public/request/request_spec.rb | |
+++ b/spec/public/request/request_spec.rb | |
@@ -76,6 +76,11 @@ describe Merb::Request, " query and body params" do | |
request.params[:inflated_object].should eql(["foo", "bar"]) | |
end | |
+ it "should not try to parse the request body as JSON on GET" do | |
+ request = fake_request({:request_method => "GET", :content_type => "application/json"}, :req => "") | |
+ lambda { request.params }.should_not raise_error(JSON::ParserError) | |
+ end | |
+ | |
it "should support XML params" do | |
request = fake_request({:content_type => "application/xml"}, :req => %{<foo bar="baz"><baz/></foo>}) | |
request.stub!(:route_params).and_return({}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment