AO3-7320 Check whether comment is already marked as spam or deleted b…#5702
AO3-7320 Check whether comment is already marked as spam or deleted b…#5702QiwiZ wants to merge 2 commits intootwcode:masterfrom
Conversation
…efore marking as spam
|
Hi, Julian Saxl! Thank you so much for this pull request. Someone will be along to review it soon and advise you about the tests. We're always happy to help folks who are new to Ruby on Rails. In the meantime, I've updated the Jira issue status to In Review so no one mistakenly creates a duplicate pull request. If you'd like the ability to comment on, assign, and transition issues in the future, you're welcome to create a Jira account! It makes things a bit easier for us on the organizational side if the Full Name on your Jira account either closely matches the name you'd like us to credit in the release notes or includes it in parentheses, e.g. "Nickname (CREDIT NAME)." Once you've done that (or if you've already done it -- Jira has been unreliable about showing us new accounts in the admin panel lately), you can either reply here or send an email to otw-coders@transformativeworks.org with your account name and email address and we'll set up the permissions for you. Thanks again for contributing! If you have any questions, you can contact us at the same email address listed above. |
brianjaustin
left a comment
There was a problem hiding this comment.
One small thing. Otherwise, for now we can't fully test the Akismetor bits -- and since we're going to be changing that code a lot in the near future, I wouldn't spend the time now to make it testable
…efore marking as spam
Pull Request Checklist
as the first thing in your pull request title (e.g.
AO3-1234 Fix thing)until they are reviewed and merged before creating new pull requests.
Issue
https://otwarchive.atlassian.net/browse/AO3-7320
Purpose
This PR introduces a check before submitting a comment to Akismet as spam. If the comment is already marked as spam (not approved) or deleted the comment does not need to be submitted to Akismet again.
Testing Instructions
Sorry if this is not the right spot for this.
I am aware that the RSpec test I added covers only part of the new logic.
I could not figure out how to verify that the Akismet.submit_spam method was not called. This is due to my inexperience with Ruby.
I want to apologize in advance if this causes you undue work. I would appreciate a pointer as to how I could change my test to include said check.
Credit
Julian Saxl
He/Him