-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AO3-6518 Spam check runs on abuse reports if the email you enter has different capitalization than the email on your account #4755
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code change looks good! But we could use a new example in the abuse report spec to cover this. We currently only have a test that covers emails that are an exact match.
Also, just a reminder to make sure you transition the Jira issue to In Review when you open a pull request. (If you set the issue to In Progress when you start work, the change should happen automatically.) If Jira won't let you do that, please let me know and I'll see if something's wrong with your account permissions.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As pointed out in the other PR where you accidentally added this test, the test wasn't failing there. That means it's not testing the fix.
To fix the test, the safe_report
needs to be guaranteed to be created before the user is modified. To achieve that, change its creation to let!(:safe_report)
so the report is guaranteed to be created before the example: https://rspec.info/features/3-13/rspec-core/helper-methods/let/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
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-6518
Purpose
Previously, the spam checker was flagging the report as spam if the casing of the emails for the account and submission did not match. We fixed this by downcasing both values before comparing.
Testing Instructions
Form should submit successfully.
Credit
calm (they/them)