From ec75642e137a8682b099009ab205f764fe70c51e Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 28 Nov 2006 23:41:04 +0000 Subject: Merge [5645] from 1.2. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/action_pack_assertions_test.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'actionpack') diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index 1b4e0b5aca..5f5e1dca26 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -4,7 +4,7 @@ require File.dirname(__FILE__) + '/../abstract_unit' class ActionPackAssertionsController < ActionController::Base # this does absolutely nothing - def nothing() render_text ""; end + def nothing() head :ok end # a standard template def hello_world() render "test/hello_world"; end @@ -27,13 +27,13 @@ class ActionPackAssertionsController < ActionController::Base def redirect_external() redirect_to_url "http://www.rubyonrails.org"; end # a 404 - def response404() render_text "", "404 AWOL"; end + def response404() head '404 AWOL' end # a 500 - def response500() render_text "", "500 Sorry"; end + def response500() head '500 Sorry' end # a fictional 599 - def response599() render_text "", "599 Whoah!"; end + def response599() head '599 Whoah!' end # putting stuff in the flash def flash_me @@ -402,7 +402,9 @@ class ActionPackAssertionsControllerTest < Test::Unit::TestCase process :redirect_external assert_equal 'http://www.rubyonrails.org', @response.redirect_url + end + def test_no_redirect_url process :nothing assert_nil @response.redirect_url end -- cgit v1.2.3