package identity

import "testing"

func TestNormalizeInviteCode(t *testing.T) {
	raw := "  ab12cd  "
	if got := normalizeInviteCode(&raw); got != "AB12CD" {
		t.Fatalf("unexpected normalized invite code: %q", got)
	}
}

func TestNormalizeInviteCodeNil(t *testing.T) {
	if got := normalizeInviteCode(nil); got != "" {
		t.Fatalf("expected empty code, got %q", got)
	}
}
