test(07-07): cover already-activated activate and 22-ported corpus counts
Unit tests now expect Winter 500 HTML when the target user is already active, and the inventory assertions match 169/22/147. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -92,8 +92,20 @@ func TestCodes(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
before, err := IsAlreadyActivated(t.Context(), db, pending.ID)
|
||||
if err != nil || before {
|
||||
t.Fatalf("pending already-activated = %t err=%v", before, err)
|
||||
}
|
||||
activated, ok := VerifyActivationCode(t.Context(), db, pending.ID, activation)
|
||||
if !ok || activated == nil || !activated.IsActivated {
|
||||
t.Fatalf("activate = %v %#v", ok, activated)
|
||||
}
|
||||
after, err := IsAlreadyActivated(t.Context(), db, pending.ID)
|
||||
if err != nil || !after {
|
||||
t.Fatalf("activated already-activated = %t err=%v", after, err)
|
||||
}
|
||||
missing, err := IsAlreadyActivated(t.Context(), db, 999999)
|
||||
if err != nil || missing {
|
||||
t.Fatalf("missing already-activated = %t err=%v", missing, err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user