ref: refs/heads/master
commit 1c7be42ff168136fa6a9de94802e3dc9b27003f6
Author: Klaus Kämpf
Date: Mon Jul 20 16:55:48 2009 +0200
Adapt testcases to :error and redirects to hosts controller
---
.../test/functional/sessions_controller_test.rb | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/webclient/test/functional/sessions_controller_test.rb b/webclient/test/functional/sessions_controller_test.rb
index ffde741..bc15583 100644
--- a/webclient/test/functional/sessions_controller_test.rb
+++ b/webclient/test/functional/sessions_controller_test.rb
@@ -34,14 +34,13 @@ class SessionsControllerTest < ActionController::TestCase
# new without any parameters should redirect to hosts
def test_new
get :new
- assert_redirected_to :controller => :hosts
+ assert_redirected_to :controller => :hosts, :error => "nohostid"
end
# new with :hostname empty
def test_new_with_empty_hostid
get :new, :hostid => nil
- assert_redirected_to :controller => :hosts
- assert flash[:notice]
+ assert_redirected_to :controller => :hosts, :error => "nohostid"
end
# new with hostname, must show login
@@ -92,9 +91,8 @@ class SessionsControllerTest < ActionController::TestCase
post :create, :login => 'quentin', :password => 'bad host', :hostid => @host.id
assert_nil session[:account_id]
assert_nil flash[:warning]
- assert flash[:error]
- # we should be at the login form again
- assert_redirected_to :controller => :sessions, :action => :new
+ # we should be at the hosts list againn
+ assert_redirected_to :controller => :hosts, :hostid => @host.id, :error => "econnrefused"
end
def test_create_with_exception_raised
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org