From 2969b38bd098708327f3c41fd22690d274f7fa1c Mon Sep 17 00:00:00 2001 From: Alexey Verkhovsky Date: Sat, 26 Mar 2005 00:15:04 +0000 Subject: [PATCH] Fixed expected redirection path in a couple of tests --- app/controllers/admin_controller.rb | 1 + test/functional/admin_controller_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 549356a6..f3ef5ded 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -37,6 +37,7 @@ class AdminController < ApplicationController :id => 'HomePage' rescue Instiki::ValidationError => e flash[:error] = e.message + # and re-render the form again end else redirect_to :controller => 'wiki', :action => 'index' diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb index bd1fdfcb..b40f2b98 100644 --- a/test/functional/admin_controller_test.rb +++ b/test/functional/admin_controller_test.rb @@ -68,7 +68,7 @@ class AdminControllerTest < Test::Unit::TestCase process 'create_web', 'system_password' => 'pswd', 'name' => 'Wiki Two', 'address' => 'wiki2' - assert_redirected_to :web => 'wiki2', :action => 'show', :id => 'HomePage' + assert_redirected_to :web => 'wiki2', :action => 'new', :id => 'HomePage' wiki2 = @wiki.webs['wiki2'] assert wiki2 assert_equal 'Wiki Two', wiki2.name @@ -80,7 +80,7 @@ class AdminControllerTest < Test::Unit::TestCase process 'create_web', 'system_password' => 'instiki', 'name' => 'Wiki Two', 'address' => 'wiki2' - assert_redirected_to :web => 'wiki2', :action => 'show', :id => 'HomePage' + assert_redirected_to :web => 'wiki2', :action => 'new', :id => 'HomePage' end def test_create_web_failed_authentication