We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 308fce4 commit 662a9b8Copy full SHA for 662a9b8
1 file changed
test/controllers/admin_controller_test.rb
@@ -165,4 +165,21 @@ class AdminControllerTest < ActionController::TestCase
165
assert_response(:success)
166
assert_not_nil assigns(:logs)
167
end
168
+
169
+ test 'hellban should correctly block the user' do
170
+ sign_in users(:global_admin)
171
172
+ user = users(:standard_user)
173
+ try_hellban_user(user)
174
+ user.reload
175
176
+ assert_response(:found)
177
+ assert BlockedItem.where(item_type: 'email', value: user.email).any?
178
+ end
179
180
+ private
181
182
+ def try_hellban_user(user)
183
+ post :hellban, params: { id: user.id }
184
185
0 commit comments