From c8d68dfed3c83f3b5c32dc58d797254b219744b9 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 8 Dec 2004 10:43:24 +0000 Subject: Killed the out of place alias and made sure you can use the different HTTP methods within the same testaction git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@80 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/action_pack_assertions_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index 489373d5c3..1389e02e0e 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -111,6 +111,18 @@ class ActionPackAssertionsControllerTest < Test::Unit::TestCase post :raise_on_get assert_equal @response.body, 'request method: POST' end + + # test the get/post switch within one test action + def test_get_post_switch + post :raise_on_get + assert_equal @response.body, 'request method: POST' + get :raise_on_post + assert_equal @response.body, 'request method: GET' + post :raise_on_get + assert_equal @response.body, 'request method: POST' + get :raise_on_post + assert_equal @response.body, 'request method: GET' + end # test the assertion of goodies in the template def test_assert_template_has -- cgit v1.2.3