Skip to content

test: generate per-user email #9322

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

Merged
merged 1 commit into from
Aug 24, 2024
Merged

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Aug 24, 2024

When generating a test user, derive that user's email address from the username.

This makes asserting the correct recipient emails are used when inspecting emails in tests.

@domodwyer I extracted that from one of your branches, since it seems like a useful change on its own and is also used/needed for #2705 :)

When generating a test user, derive that user's email address from the
username.

This makes asserting the correct recipient emails are used when
inspecting emails in tests.
@Turbo87 Turbo87 added C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear A-backend ⚙️ labels Aug 24, 2024
@Turbo87 Turbo87 enabled auto-merge (squash) August 24, 2024 08:45
@Turbo87 Turbo87 merged commit d863ea4 into rust-lang:main Aug 24, 2024
8 checks passed
Copy link

codecov bot commented Aug 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.16%. Comparing base (02d0087) to head (1642204).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9322   +/-   ##
=======================================
  Coverage   89.16%   89.16%           
=======================================
  Files         282      282           
  Lines       28904    28904           
=======================================
  Hits        25772    25772           
  Misses       3132     3132           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Turbo87 Turbo87 deleted the tests/per-user-email branch August 24, 2024 08:55
Copy link
Contributor

@domodwyer domodwyer left a comment

Choose a reason for hiding this comment

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

Glad it's useful!

There's also b397f42 which helps validate which email is sent to which user - you can see it in action here: e97e93b - maybe it helps? 🙏

FYI I do plan on polishing up that branch and submitting it soon - I figured it was better to get the previous refactor in first!

/// Create a new user with a verified email address in the database and return a mock user
/// session
/// Create a new user with a verified email address in the database
/// (`<username>@example.com``) and return a mock user session.
Copy link
Contributor

Choose a reason for hiding this comment

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

Whoops

Suggested change
/// (`<username>@example.com``) and return a mock user session.
/// (`<username>@example.com`) and return a mock user session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants