Additional test for MyController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9438 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
6f71a508eb
commit
864054c005
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue