More flexible mail notifications settings at user level. A user has now 3 options:
* notification on any event on all his projects * notification on any event on selected projects only (if the user belongs to more than 1 project) * notification only for things that he watches or he is involded in (eg. issues that he watches or he is author or assignee) git-svn-id: http://redmine.rubyforge.org/svn/trunk@855 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -61,29 +61,30 @@ class MyControllerTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_change_password
|
||||
get :account
|
||||
get :password
|
||||
assert_response :success
|
||||
assert_template 'account'
|
||||
assert_template 'password'
|
||||
|
||||
# non matching password confirmation
|
||||
post :change_password, :password => 'jsmith',
|
||||
:new_password => 'hello',
|
||||
:new_password_confirmation => 'hello2'
|
||||
post :password, :password => 'jsmith',
|
||||
:new_password => 'hello',
|
||||
:new_password_confirmation => 'hello2'
|
||||
assert_response :success
|
||||
assert_template 'account'
|
||||
assert_template 'password'
|
||||
assert_tag :tag => "div", :attributes => { :class => "errorExplanation" }
|
||||
|
||||
# wrong password
|
||||
post :change_password, :password => 'wrongpassword',
|
||||
:new_password => 'hello',
|
||||
:new_password_confirmation => 'hello'
|
||||
assert_redirected_to 'my/account'
|
||||
post :password, :password => 'wrongpassword',
|
||||
:new_password => 'hello',
|
||||
:new_password_confirmation => 'hello'
|
||||
assert_response :success
|
||||
assert_template 'password'
|
||||
assert_equal 'Wrong password', flash[:error]
|
||||
|
||||
# good password
|
||||
post :change_password, :password => 'jsmith',
|
||||
:new_password => 'hello',
|
||||
:new_password_confirmation => 'hello'
|
||||
post :password, :password => 'jsmith',
|
||||
:new_password => 'hello',
|
||||
:new_password_confirmation => 'hello'
|
||||
assert_redirected_to 'my/account'
|
||||
assert User.try_to_login('jsmith', 'hello')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user