FILE / ScuroNeko/Laniakea
tgapi/migration_v2_test.go
Исходный файл и его история в репозитории.
Golang lint / lint (push) Failing after 1m37s
(fix): finalize v2 contracts (tests): cover v2 migration (doc): prepare release guidance
33 lines
1.0 KiB
Go
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")
|
|
}
|
|
}
|