Skip to content

Commit

Permalink
mail
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime committed Mar 8, 2024
1 parent 7f4bd96 commit 275959b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/utils/email.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function sendEmail({
| { html: string; text: string; react?: never }
| { react: ReactElement; html?: never; text?: never }
)) {
const from = 'hello@epicstack.dev'
const from = 'onboarding@resend.dev'

const email = {
from,
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/onboarding.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ test('onboarding with link', async ({ page, getOnboardingData }) => {
const email = await readEmail(onboardingData.email)
invariant(email, 'Email not found')
expect(email.to).toBe(onboardingData.email.toLowerCase())
expect(email.from).toBe('hello@epicstack.dev')
expect(email.from).toBe('onboarding@resend.dev')
expect(email.subject).toMatch(/welcome/i)
const onboardingUrl = extractUrl(email.text)
invariant(onboardingUrl, 'Onboarding URL not found')
Expand Down Expand Up @@ -120,7 +120,7 @@ test('onboarding with a short code', async ({ page, getOnboardingData }) => {
const email = await readEmail(onboardingData.email)
invariant(email, 'Email not found')
expect(email.to).toBe(onboardingData.email.toLowerCase())
expect(email.from).toBe('hello@epicstack.dev')
expect(email.from).toBe('onboarding@resend.dev')
expect(email.subject).toMatch(/welcome/i)
const codeMatch = email.text.match(CODE_REGEX)
const code = codeMatch?.groups?.code
Expand Down Expand Up @@ -167,7 +167,7 @@ test('reset password with a link', async ({ page, insertNewUser }) => {
invariant(email, 'Email not found')
expect(email.subject).toMatch(/password reset/i)
expect(email.to).toBe(user.email.toLowerCase())
expect(email.from).toBe('hello@epicstack.dev')
expect(email.from).toBe('onboarding@resend.dev')
const resetPasswordUrl = extractUrl(email.text)
invariant(resetPasswordUrl, 'Reset password URL not found')
await page.goto(resetPasswordUrl)
Expand Down Expand Up @@ -225,7 +225,7 @@ test('reset password with a short code', async ({ page, insertNewUser }) => {
invariant(email, 'Email not found')
expect(email.subject).toMatch(/password reset/i)
expect(email.to).toBe(user.email)
expect(email.from).toBe('hello@epicstack.dev')
expect(email.from).toBe('onboarding@resend.dev')
const codeMatch = email.text.match(CODE_REGEX)
const code = codeMatch?.groups?.code
invariant(code, 'Reset Password code not found')
Expand Down

0 comments on commit 275959b

Please sign in to comment.