Skip to content

Commit

Permalink
Added two specs for setting request.raw_post. Passes for #dispatch_to…
Browse files Browse the repository at this point in the history
…, fails for #request.

Signed-off-by: Michael S. Klishin <michael@novemberain.com>
  • Loading branch information
mlangenberg authored and michaelklishin committed Sep 13, 2008
1 parent 79f233a commit 8dc6e2c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/public/test/request_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 8dc6e2c

Please sign in to comment.