aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/action_pack_assertions_test.rb12
1 files changed, 12 insertions, 0 deletions
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