mirror of
https://github.com/moebooru/moebooru
synced 2025-08-30 21:45:13 +00:00
Fix test regarding parameter filtering.
This commit is contained in:
@@ -99,7 +99,9 @@ class UserControllerTest < ActionController::TestCase
|
||||
get :edit, {}, :user_id => 4
|
||||
assert_response :success
|
||||
|
||||
assert_raises(ActiveModel::MassAssignmentSecurity::Error) { post :update, { :user => { :invite_count => 10 } }, :user_id => 4 }
|
||||
original_invite_count = User.find(4).invite_count
|
||||
post :update, { :user => { :invite_count => original_invite_count + 2 } }, :user_id => 4
|
||||
assert_equal(original_invite_count, User.find(4).invite_count)
|
||||
|
||||
post :update, { :user => { :receive_dmails => true } }, :user_id => 4
|
||||
assert_equal(true, User.find(4).receive_dmails?)
|
||||
|
Reference in New Issue
Block a user