[PR #8869] test(organization): add regression for owner-to-owner invites #16511

Open
opened 2026-04-13 10:33:03 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8869
Author: @Oluwatobi-Mustapha
Created: 4/1/2026
Status: 🔄 Open

Base: main ← Head: fix/issue-8826-owner-invite


📝 Commits (1)

  • d411fcb test(organization): add regression coverage for owner invite flow

📊 Changes

1 file changed (+43 additions, -0 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/organization.test.ts (+43 -0)

📄 Description

Resolves #8826.

Summary

  • Adds an organization regression test for the reported configuration: allowInviteByRole: ["owner", "admin"].
  • Verifies that an organization owner can invite another user with role: "owner".
  • Keeps coverage close to the reported reproduction to prevent regressions.

Validation

  • pnpm --filter better-auth exec vitest src/plugins/organization/organization.test.ts -t "allow owner to invite with owner role when allowInviteByRole is configured"
  • pnpm --filter better-auth test

🔄 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/8869 **Author:** [@Oluwatobi-Mustapha](https://github.com/Oluwatobi-Mustapha) **Created:** 4/1/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/issue-8826-owner-invite` --- ### 📝 Commits (1) - [`d411fcb`](https://github.com/better-auth/better-auth/commit/d411fcb7391a1a9f8f76353fbf8c89e94f04e5ff) test(organization): add regression coverage for owner invite flow ### 📊 Changes **1 file changed** (+43 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/organization.test.ts` (+43 -0) </details> ### 📄 Description Resolves #8826. ### Summary - Adds an organization regression test for the reported configuration: `allowInviteByRole: ["owner", "admin"]`. - Verifies that an organization owner can invite another user with `role: "owner"`. - Keeps coverage close to the reported reproduction to prevent regressions. ### Validation - `pnpm --filter better-auth exec vitest src/plugins/organization/organization.test.ts -t "allow owner to invite with owner role when allowInviteByRole is configured"` - `pnpm --filter better-auth test` --- <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-13 10:33:03 -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#16511