(new): rich message support
Golang lint / lint (pull_request) Successful in 1m20s
Golang lint / lint (push) Successful in 4m8s

(fix): runtime reliability
(tests): regression coverage
(doc): v1.1 release notes
This commit is contained in:
2026-08-12 16:34:44 +03:00
parent 48ddf66540
commit f03a081ed6
83 changed files with 6122 additions and 1925 deletions
+15
View File
@@ -72,6 +72,18 @@ func TestUpdateUnmarshalSetsType(t *testing.T) {
}`,
want: UpdateTypeManagedBot,
},
{
name: "subscription",
body: `{
"update_id": 6,
"subscription": {
"user": {"id": 13, "is_bot": false, "first_name": "Subscriber"},
"invoice_payload": "monthly",
"state": "active"
}
}`,
want: UpdateTypeSubscription,
},
}
for _, tt := range tests {
@@ -89,6 +101,9 @@ func TestUpdateUnmarshalSetsType(t *testing.T) {
if tt.want == UpdateTypeManagedBot && update.ManagedBot.Bot.ID != 12 {
t.Fatalf("unexpected managed bot id: got %d want %d", update.ManagedBot.Bot.ID, 12)
}
if tt.want == UpdateTypeSubscription && update.Subscription.User.ID != 13 {
t.Fatalf("unexpected subscription user id: got %d want %d", update.Subscription.User.ID, 13)
}
})
}
}