id: " ",
chat: whatsappTestAna.String(),
text: "hi",
err: "the id must have 1 to 100 bytes",
},
{
id: " ",
chat: whatsappTestAna.String(),
text: "hi",
err: "the id must have 1 to 100 bytes",
},
{
id: "a",
chat: whatsappTestAna.String(),
text: "",
err: "the text must have 1 to 65536 bytes",
},
{
id: "a",
chat: whatsappTestAna.String(),
text: "",
err: "the text must have 1 to 65536 bytes",
},
{
id: "a",
chat: types.StatusBroadcastJID.String(),
text: "hi",
err: `"status@broadcast" is not a private chat or a group`,
},
{
id: "a",
chat: types.StatusBroadcastJID.String(),
text: "hi",
err: `"status@broadcast" is not a private chat or a group`,
},
{
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
_, err := whatsapp.Send(t.Context(), tc.id, tc.chat, tc.text, "")
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
_, err := whatsapp.Send(t.Context(), tc.id, tc.chat, tc.text, "")