package app

import "testing"

func TestParseSlotFromRemark(t *testing.T) {
    r := parseSlotFromRemark("lottery:activity:1|issue:2|count:1|slot:42")
    if r != 42 { t.Fatalf("slot parse failed: %d", r) }
    r2 := parseSlotFromRemark("lottery:activity:1|issue:2|count:1")
    if r2 != -1 { t.Fatalf("expected -1, got %d", r2) }
}

