Prepare verified laboratory 6 implementation and evidence

This commit is contained in:
rey
2026-11-17 17:32:06 +03:00
parent 470d9d6f1e
commit 7d56e52fd0
335 changed files with 31206 additions and 72 deletions
@@ -0,0 +1,17 @@
package handler
import (
"encoding/json"
"testing"
)
func TestMessageJSONRequiresStringTextAndArrayIDs(t *testing.T) {
for _, body := range []string{`{"attachment_ids":[]}`, `{"text":null,"attachment_ids":[]}`, `{"text":"ok","attachment_ids":null}`} {
t.Run(body, func(t *testing.T) {
var message CreateMessage
if err := json.Unmarshal([]byte(body), &message); err == nil {
t.Fatal("accepted a missing/null required field")
}
})
}
}