summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-10-20 12:47:05 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-10-20 12:47:05 +0000
commit90d33c3e518f9e05d9e2893907ebd157062d33de (patch)
treec07d7071247f566b3049a672207dd29c707f67a0 /test/functional
parenteacd050630b2d2b3047e056a7dab7661fba083ca (diff)
downloadredmine-90d33c3e518f9e05d9e2893907ebd157062d33de.tar.gz
redmine-90d33c3e518f9e05d9e2893907ebd157062d33de.zip
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
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/my_controller_test.rb27
1 files changed, 14 insertions, 13 deletions
diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb
index b2389c39b..5df2932ed 100644
--- a/test/functional/my_controller_test.rb
+++ b/test/functional/my_controller_test.rb
@@ -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