Permalink
Browse files

Added two specs for setting request.raw_post. Passes for #dispatch_to…

…, fails for #request.

Signed-off-by: Michael S. Klishin <michael@novemberain.com>
  • Loading branch information...
1 parent 79f233a commit 8dc6e2c1666f390fbd64f790d07120128db78e00 @mlangenberg mlangenberg committed with michaelklishin Sep 12, 2008
Showing with 10 additions and 0 deletions.
  1. +10 −0 spec/public/test/request_helper_spec.rb
@@ -65,6 +65,11 @@
controller.params[:action].should == "show"
end
+
+ it "should support setting request.raw_post" do
+ controller = dispatch_to(@controller_klass, :show, {}, {:post_body => 'some XML'})
+ controller.request.raw_post.should == 'some XML'
+ end
end
describe "#dispatch_with_basic_authentication_to" do
@@ -213,6 +218,11 @@
end
end
+ it "should support setting request.raw_post" do
+ controller = request("/namespaced/spec_helper_controller", {}, {:post_body => 'some XML'})
+ controller.request.raw_post.should == 'some XML'
+ end
+
it "should get namespaced index action" do
Merb::Test::ControllerAssertionMock.should_receive(:called).with(:index)
controller = request("/namespaced/spec_helper_controller")

0 comments on commit 8dc6e2c

Please sign in to comment.