Mercurial > hg > soundsoftware-site
comparison test/functional/my_controller_test.rb @ 51:371eac10df0b live
* Merge from "cannam" branch. This includes update to Redmine trunk, plus welcome/tip-of-the-day from luisf branch.
author | Chris Cannam |
---|---|
date | Wed, 24 Nov 2010 12:20:08 +0000 |
parents | 94944d00e43c |
children | af80e5618e9b |
comparison
equal
deleted
inserted
replaced
34:09b1d4349da3 | 51:371eac10df0b |
---|---|
66 def test_update_account | 66 def test_update_account |
67 post :account, :user => {:firstname => "Joe", | 67 post :account, :user => {:firstname => "Joe", |
68 :login => "root", | 68 :login => "root", |
69 :admin => 1, | 69 :admin => 1, |
70 :custom_field_values => {"4" => "0100562500"}} | 70 :custom_field_values => {"4" => "0100562500"}} |
71 assert_redirected_to 'my/account' | 71 assert_redirected_to '/my/account' |
72 user = User.find(2) | 72 user = User.find(2) |
73 assert_equal user, assigns(:user) | 73 assert_equal user, assigns(:user) |
74 assert_equal "Joe", user.firstname | 74 assert_equal "Joe", user.firstname |
75 assert_equal "jsmith", user.login | 75 assert_equal "jsmith", user.login |
76 assert_equal "0100562500", user.custom_value_for(4).value | 76 assert_equal "0100562500", user.custom_value_for(4).value |
100 | 100 |
101 # good password | 101 # good password |
102 post :password, :password => 'jsmith', | 102 post :password, :password => 'jsmith', |
103 :new_password => 'hello', | 103 :new_password => 'hello', |
104 :new_password_confirmation => 'hello' | 104 :new_password_confirmation => 'hello' |
105 assert_redirected_to 'my/account' | 105 assert_redirected_to '/my/account' |
106 assert User.try_to_login('jsmith', 'hello') | 106 assert User.try_to_login('jsmith', 'hello') |
107 end | 107 end |
108 | 108 |
109 def test_page_layout | 109 def test_page_layout |
110 get :page_layout | 110 get :page_layout |