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 ",
},
}
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",
},
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"}]}`,
},
}
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",
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),
},
}