2
0
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:
nanaya
2015-07-25 15:33:01 +09:00
parent badd9d4bb3
commit 3cbb33bf9b

View File

@@ -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?)