mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
Test User controller update
This commit is contained in:
parent
7f3e7a68cb
commit
ba3bbd0a99
@ -33,4 +33,16 @@ class UsersControllerTest < ActionController::TestCase
|
||||
get :anonymous_login
|
||||
assert_redirected_to dashboard_path
|
||||
end
|
||||
|
||||
test 'can update user' do
|
||||
log_in_user :tolkien
|
||||
post :update, user: {
|
||||
name: 'JRRTolkien',
|
||||
password: 'Mellon',
|
||||
email: 'jrr@localhost'
|
||||
}
|
||||
assert_redirected_to homepage_path
|
||||
assert_not_nil assigns(:user)
|
||||
assert_equal assigns(:user).email, 'jrr@localhost'
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user