[yast-commit] <web-client> master : fix eula tests (as now after succesfull finish is redirected to control panel) and add test for wizard envirement which is the one when eula the most often run.
ref: refs/heads/master commit 796a5620e129751fdf73ae8464d6bce9a0c91cab Author: Josef Reidinger <jreidinger@suse.cz> Date: Fri Dec 11 13:52:47 2009 +0100 fix eula tests (as now after succesfull finish is redirected to control panel) and add test for wizard envirement which is the one when eula the most often run. --- .../eulas/test/functional/eulas_controller_test.rb | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/plugins/eulas/test/functional/eulas_controller_test.rb b/plugins/eulas/test/functional/eulas_controller_test.rb index 8d91363..dcfd1c1 100644 --- a/plugins/eulas/test/functional/eulas_controller_test.rb +++ b/plugins/eulas/test/functional/eulas_controller_test.rb @@ -43,8 +43,8 @@ class EulasControllerTest < ActionController::TestCase @controller = EulasController.new # setup for eulas controller tests - @opensuse_eula = Eula.new ('openSUSE-11.1', false, ['en'], true) - @sles_eula = Eula.new ('SLES-11', false, ['en'], false) + @opensuse_eula = Eula.new('openSUSE-11.1', false, ['en'], true) + @sles_eula = Eula.new('SLES-11', false, ['en'], false) @proxy = Proxy.new([@opensuse_eula, @sles_eula], {:read=>true, :write=>true}) YaST::ServiceResource.stubs(:proxy_for).with('org.opensuse.yast.modules.eulas').returns(@proxy) @@ -71,7 +71,20 @@ class EulasControllerTest < ActionController::TestCase assert_redirected_to "/eulas/show/2" post :update, "accepted" => true, "id" => "2" assert(@sles_eula.accepted) - assert_redirected_to "/eulas" # in basesystem redirected to "/controller/nextstep" + assert_redirected_to :controller => "controlpanel", :action => "index" + end + + def test_eula_step_in_wizard + session[:wizard_current] = "test" + session[:wizard_steps] = "systemtime,eulas,language" + @opensuse_eula.accepted = false + get :index + post :update, "accepted" => "false", "id" => "1" + post :update, "accepted" => "true", "id" => "1" + post :update, "accepted" => false, "id" => "2" + post :update, "accepted" => true, "id" => "2" + assert(@sles_eula.accepted) + assert_redirected_to :controller => "controlpanel", :action => "nextstep" end end -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
Josef Reidinger