[PR #4431] [MERGED] test: add tests for sendOnSignIn #30980

Closed
opened 2026-04-17 21:56:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4431
Author: @frectonz
Created: 9/4/2025
Status: Merged
Merged: 9/4/2025
Merged by: @himself65

Base: canaryHead: test/test-send-on-sign-in-works-properly


📝 Commits (2)

📊 Changes

1 file changed (+65 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/api/routes/sign-in.test.ts (+65 -1)

📄 Description

Summary by cubic

Add tests to verify email verification behavior on sign-in based on emailVerification.sendOnSignIn.
Confirms the initial email is sent on user setup, sign-in returns EMAIL_NOT_VERIFIED, and sendVerificationEmail is called twice when enabled and once when disabled.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4431 **Author:** [@frectonz](https://github.com/frectonz) **Created:** 9/4/2025 **Status:** ✅ Merged **Merged:** 9/4/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `test/test-send-on-sign-in-works-properly` --- ### 📝 Commits (2) - [`e075cda`](https://github.com/better-auth/better-auth/commit/e075cda3664ba634e1a04901b38f57be35daa7fa) test: add tests for `sendOnSignIn` - [`28b983f`](https://github.com/better-auth/better-auth/commit/28b983ffd44087c3e0699781f01f7e43651d52b7) test: update ### 📊 Changes **1 file changed** (+65 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/routes/sign-in.test.ts` (+65 -1) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Add tests to verify email verification behavior on sign-in based on emailVerification.sendOnSignIn. Confirms the initial email is sent on user setup, sign-in returns EMAIL_NOT_VERIFIED, and sendVerificationEmail is called twice when enabled and once when disabled. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 21:56:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#30980