package pushserver import ( "testing" "github.com/dariuszjaniak/warp/server/internal/storage" ) func TestReceiptThread(t *testing.T) { for threadID, want := range map[string]string{ // No thread_id: the receipt reads the room as a whole. "": storage.AllThreads, // "main" reads the main timeline, which the store files as ''. "main": storage.ThreadMain, // Anything else is a thread root, and reads that thread. "$root:warp.example": "$root:warp.example", } { if got := receiptThread(threadID); got != want { t.Errorf("receiptThread(%q) = %q, want %q", threadID, got, want) } } }