comparison test/functional/my_controller_test.rb @ 38:33d69fee1d99 cannam

* Merge SVN update from default branch
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Fri, 19 Nov 2010 13:41:40 +0000
parents 94944d00e43c
children af80e5618e9b
comparison
equal deleted inserted replaced
29:192d132064a5 38:33d69fee1d99
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