diff --git a/internal/api/auth_register_test.go b/internal/api/auth_register_test.go index 1ae630a5..c32205a9 100644 --- a/internal/api/auth_register_test.go +++ b/internal/api/auth_register_test.go @@ -271,6 +271,11 @@ func TestRegister_OneInviteMakesOneAccountUnderARace(t *testing.T) { func TestRegister_AfterTheFirstAccountAnInviteIsTheOnlyWayIn(t *testing.T) { h, pool := testHandlers(t) resetInvites(t, h) + // Exactly one account, so the first sign-up below is the second account: + // accounts other tests made through sign-up survive dbtest's reset. + if _, err := pool.Exec(context.Background(), "DELETE FROM users"); err != nil { + t.Fatalf("reset users: %v", err) + } admin := seedUser(t, pool, "admin1", "pw", true) const token = "test-invite-abc123" if _, err := pool.Exec(context.Background(),