DEV: reviewable_user spec should assert on delete_user_block instead of delete_user (#24692)

This commit is contained in:
Roman Rizzi 2023-12-04 12:44:32 -03:00 committed by GitHub
parent 0af8bbd378
commit 037622fc7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ RSpec.describe ReviewableUser, type: :model do
expect(actions.has?(:delete_user_block)).to eq(false)
end
it "can delete a user without a giving a rejection reason if the user was a spammer" do
it "doesn't ask for a rejection reason when deleting a user who was flagged as a possible spammer" do
reviewable.reviewable_scores.build(user: admin, reason: "suspect_user")
assert_require_reject_reason(:delete_user, false)
@ -36,10 +36,10 @@ RSpec.describe ReviewableUser, type: :model do
assert_require_reject_reason(:delete_user, true)
end
it "can delete and block a user without giving a rejection reason if the user was a spammer" do
it "doesn't ask for a rejection reason when blocking a user who was flagged as a possible spammer" do
reviewable.reviewable_scores.build(user: admin, reason: "suspect_user")
assert_require_reject_reason(:delete_user, false)
assert_require_reject_reason(:delete_user_block, false)
end
it "requires a rejection reason to delete and block a user" do