Implement owner setup and browser authentication sessions
Some checks failed
CI / Backend (push) Failing after 1s
CI / Frontend (push) Successful in 13s
CI / Contracts and repository policy (push) Failing after 3s
CI / Container (push) Has been skipped

This commit is contained in:
Elijah 2026-07-16 19:45:40 -07:00
parent 077cf7601a
commit 715423ab8e
21 changed files with 2185 additions and 14 deletions

View file

@ -0,0 +1,26 @@
package domain
import (
"errors"
"testing"
)
func TestNewOwnerIdentityNormalizesAndFoldsUsername(t *testing.T) {
t.Parallel()
identity, err := NewOwnerIdentity(" ÉLIJAH ", " Elijah Kuntz ")
if err != nil {
t.Fatalf("NewOwnerIdentity returned an error: %v", err)
}
if identity.Username != "ÉLIJAH" || identity.UsernameKey != "élijah" || identity.DisplayName != "Elijah Kuntz" {
t.Fatalf("unexpected identity: %#v", identity)
}
}
func TestValidatePasswordRejectsShortPassword(t *testing.T) {
t.Parallel()
if err := ValidatePassword("too-short"); !errors.Is(err, ErrInvalidPassword) {
t.Fatalf("ValidatePassword error = %v, want %v", err, ErrInvalidPassword)
}
}