diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-04-18 19:30:08 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-04-18 19:30:08 +0000 |
commit | 864054c00504f8107535aacf181ccedf52cb1d0f (patch) | |
tree | ba4886a545728898dfeba57807e7d82d63250015 | |
parent | 6f71a508eb9e9eb2655172e17a7799e011e9086f (diff) | |
download | redmine-864054c00504f8107535aacf181ccedf52cb1d0f.tar.gz redmine-864054c00504f8107535aacf181ccedf52cb1d0f.zip |
Additional test for MyController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9438 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/functional/my_controller_test.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb index 644ecb792..a0c2e2456 100644 --- a/test/functional/my_controller_test.rb +++ b/test/functional/my_controller_test.rb @@ -22,7 +22,7 @@ require 'my_controller' class MyController; def rescue_action(e) raise e end; end class MyControllerTest < ActionController::TestCase - fixtures :users, :user_preferences, :roles, :projects, :issues, :issue_statuses, :trackers, :enumerations, :custom_fields + fixtures :users, :user_preferences, :roles, :projects, :issues, :issue_statuses, :trackers, :enumerations, :custom_fields, :auth_sources def setup @controller = MyController.new @@ -152,6 +152,14 @@ class MyControllerTest < ActionController::TestCase assert User.try_to_login('jsmith', 'hello') end + def test_change_password_should_redirect_if_user_cannot_change_its_password + User.find(2).update_attribute(:auth_source_id, 1) + + get :password + assert_not_nil flash[:error] + assert_redirected_to '/my/account' + end + def test_page_layout get :page_layout assert_response :success |