comparison test/functional/.svn/text-base/my_controller_test.rb.svn-base @ 37:94944d00e43c

* Update to SVN trunk rev 4411
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Fri, 19 Nov 2010 13:24:41 +0000
parents 513646585e45
children af80e5618e9b
comparison
equal deleted inserted replaced
22:40f7cfd4df19 37:94944d00e43c
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