FILE / ScuroNeko/Laniakea

tgapi/migration_v2_test.go

Исходный файл и его история в репозитории.
FILE d78526242bc7aa184ce5e030b95d8afe2d1243c4
Files
Laniakea/tgapi/migration_v2_test.go
T
ScuroNeko d78526242b
Golang lint / lint (push) Failing after 1m37s
(new): support Bot API 10.3
(fix): finalize v2 contracts
(tests): cover v2 migration
(doc): prepare release guidance
2026-09-08 23:21:38 +03:00

33 lines
1.0 KiB
Go

package tgapi
import (
"context"
"testing"
)
func TestV2MigrationSurfaceCompiles(t *testing.T) {
answer := PollAnswer{User: &User{ID: 1}}
if answer.User == nil {
t.Fatal("poll voter is missing")
}
_ = ChatFullInfo{AvailableReactions: []ReactionType{}}
_ = ReplyParameters{QuoteParseMode: string(ParseHTML)}
_ = InputChecklist{OthersCanAddTasks: true, OthersCanMarkTasksAsDone: true}
_ = SendMessage{EphemeralMessageParameters: &EphemeralMessageParameters{ReceiverUserID: 1}}
request := NewRequest[bool]("customMethod", NoParams)
upload := NewUploaderRequest[bool]("customUpload", NoParams)
var api *API
var uploader *Uploader
if false {
_, _ = api.Do(request)
_, _ = api.DoWithContext(context.Background(), request)
_, _ = uploader.Do(upload)
_, _ = uploader.DoWithContext(context.Background(), upload)
_, _ = api.DeleteAllMessageReactions(DeleteAllMessageReactions{})
_, _ = api.GetFileByLinkLimit("file/path", 1<<20)
_, _ = api.OpenFileByLinkWithContext(context.Background(), "file/path")
}
}