X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/c781f79f3c8cb9a7577ee1574d196988da2719b3..d8f3785bb69288663f4cc46bf4d609c6770452d5:/daemon_message_test.go diff --git a/daemon_message_test.go b/daemon_message_test.go index 27138d3..3cca09f 100644 --- a/daemon_message_test.go +++ b/daemon_message_test.go @@ -125,11 +125,11 @@ func TestEmptyChildReplySendsNothingAndWakesNobody(t *testing.T) { text string }{ { - name: "empty final reply", + name: "sends nothing for an empty final reply", text: "", }, { - name: "whitespace final reply", + name: "sends nothing for a whitespace final reply", text: " \n\t ", }, } @@ -465,12 +465,12 @@ func TestParentCanMessageOnlyItsOwnChildren(t *testing.T) { target: "OneChat", }, { - name: "unknown sender", + name: "refuses an unknown sender", source: "Other", target: "Garden", }, { - name: "unknown recipient", + name: "refuses an unknown recipient", source: "OneChat", target: "Other", }, @@ -494,19 +494,19 @@ func TestInvalidAgentMessageQueueStopsStartup(t *testing.T) { file string }{ { - name: "broken JSON", + name: "stops startup for broken JSON", file: "{", }, { - name: "unknown sender", + name: "stops startup for unknown sender", file: `{"next":1,"pending":[{"id":1,"source":"Other","target":"Garden","kind":"user"}]}`, }, { - name: "sibling delivery", + name: "stops startup for sibling delivery", file: `{"next":1,"pending":[{"id":1,"source":"Library","target":"Garden","kind":"user"}]}`, }, { - name: "invalid sequence", + name: "stops startup for invalid sequence", file: `{"next":0,"pending":[{"id":1,"source":"OneChat","target":"Garden","kind":"user"}]}`, }, } @@ -580,14 +580,14 @@ func TestRoutedWhatsAppBatchesWakeOnlyTheirChild(t *testing.T) { chat WhatsAppChat }{ { - name: "private chat", + name: "routes a private chat only to its child", chat: WhatsAppChat{ ID: whatsappTestAna.String(), Name: "Ana", }, }, { - name: "group without a mention", + name: "routes an unmentioned group only to its child", chat: WhatsAppChat{ ID: whatsappTestFamily.String(), Name: "Garden plans", @@ -760,11 +760,11 @@ func TestQueuedWhatsAppBatchRecoversBeforeItsLogAppend(t *testing.T) { id *int }{ { - name: "before log ID is stored", + name: "recovers one message before its log ID is stored", id: nil, }, { - name: "after log ID is stored", + name: "recovers one message after its log ID is stored", id: new(0), }, }