Skip to content

AO3-7488 Prevent deleted and spam comments from being resubmitted to Akismet#5844

Open
marcus8448 wants to merge 2 commits into
otwcode:masterfrom
marcus8448:AO3-7488
Open

AO3-7488 Prevent deleted and spam comments from being resubmitted to Akismet#5844
marcus8448 wants to merge 2 commits into
otwcode:masterfrom
marcus8448:AO3-7488

Conversation

@marcus8448
Copy link
Copy Markdown
Member

Issue

https://otwarchive.atlassian.net/browse/AO3-7488

Purpose

Restores the check that prevented comments that were deleted or already marked as spam from being submitted to Akismet

Plus a fix to the #mark_as_ham! test where the comment would already be marked as legitimate due to the spam status being updated in the validations.

Testing Instructions

Automated tests only. There isn’t an easy way to tell if a comment was actually sent to Akismet or not.

Credit

marcus8448 (he/him)

Comment thread spec/models/comment_spec.rb Outdated
Comment on lines +940 to +942
let(:comment) { build(:comment, approved: false, spam: true) }

before { comment.save!(validate: false) }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have create_invalid to make this a bit shorter. But that's a nitpick, so approving anyway, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants