diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-26 14:36:13 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-26 14:36:13 +0000 |
commit | 930b59eb39e2078ae83159d72dee9389ecc04897 (patch) | |
tree | a2b1b4b287ab093b2336379ed7125a7f084d41a9 /actionpack/test/controller/action_pack_assertions_test.rb | |
parent | b17e17898133812abf1f9405cdc6db0ee3879a52 (diff) | |
download | rails-930b59eb39e2078ae83159d72dee9389ecc04897.tar.gz rails-930b59eb39e2078ae83159d72dee9389ecc04897.tar.bz2 rails-930b59eb39e2078ae83159d72dee9389ecc04897.zip |
Fixed that Functional tests do not set request.path_parameters properly #1512 [Nicholas Seckar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1527 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/action_pack_assertions_test.rb')
-rw-r--r-- | actionpack/test/controller/action_pack_assertions_test.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index ccde516f31..4ecf6b6b5b 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -55,6 +55,10 @@ class ActionPackAssertionsController < ActionController::Base render_text "Mr. #{@params["name"]}" end + def render_url + render_text "<div>#{url_for(:action => 'flash_me', :only_path => true)}</div>" + end + # puts something in the session def session_stuffing session['xmas'] = 'turkey' @@ -97,6 +101,11 @@ class ActionPackAssertionsControllerTest < Test::Unit::TestCase # -- assertion-based testing ------------------------------------------------ + def test_assert_tag_and_url_for + get :render_url + assert_tag :content => "/action_pack_assertions/flash_me" + end + # test the session assertion to make sure something is there. def test_assert_session_has process :session_stuffing @@ -359,7 +368,7 @@ class ActionPackAssertionsControllerTest < Test::Unit::TestCase assert_redirected_to :action => "flash_me" follow_redirect - assert_equal 1, @request.parameters["id"] + assert_equal 1, @request.parameters["id"].to_i assert "Inconceivable!", @response.body end |