(fix): finalize v2 contracts (tests): cover v2 migration (doc): prepare release guidance
This commit is contained in:
+15
-3
@@ -9,7 +9,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"git.scuroneko.dev/scuroneko/laniakea/tgapi"
|
||||
"git.scuroneko.dev/scuroneko/laniakea/v2/tgapi"
|
||||
"git.scuroneko.dev/scuroneko/sneklog/v2"
|
||||
)
|
||||
|
||||
@@ -317,7 +317,7 @@ func TestPrepareUpdateCtxContract(t *testing.T) {
|
||||
name: "poll answer",
|
||||
update: &tgapi.Update{
|
||||
Type: tgapi.UpdateTypePollAnswer,
|
||||
PollAnswer: &tgapi.PollAnswer{User: tgapi.User{ID: 115}},
|
||||
PollAnswer: &tgapi.PollAnswer{User: &tgapi.User{ID: 115}},
|
||||
},
|
||||
wantFrom: true,
|
||||
wantFromID: 115,
|
||||
@@ -326,7 +326,7 @@ func TestPrepareUpdateCtxContract(t *testing.T) {
|
||||
name: "anonymous poll answer",
|
||||
update: &tgapi.Update{
|
||||
Type: tgapi.UpdateTypePollAnswer,
|
||||
PollAnswer: &tgapi.PollAnswer{VoterChat: tgapi.Chat{ID: -2007}},
|
||||
PollAnswer: &tgapi.PollAnswer{VoterChat: &tgapi.Chat{ID: -2007}},
|
||||
},
|
||||
wantChat: true,
|
||||
wantChatID: -2007,
|
||||
@@ -428,6 +428,18 @@ func TestPrepareUpdateCtxContract(t *testing.T) {
|
||||
wantFrom: true,
|
||||
wantFromID: 121,
|
||||
},
|
||||
{
|
||||
name: "stopped message generation",
|
||||
update: &tgapi.Update{
|
||||
Type: tgapi.UpdateTypeMessageGenerationStopped,
|
||||
StoppedMessageGeneration: &tgapi.MessageGenerationStopped{
|
||||
Chat: tgapi.Chat{ID: -2012},
|
||||
DraftID: 7,
|
||||
},
|
||||
},
|
||||
wantChat: true,
|
||||
wantChatID: -2012,
|
||||
},
|
||||
{
|
||||
name: "giveaway chat boost has no user",
|
||||
update: &tgapi.Update{
|
||||
|
||||
Reference in New Issue
Block a user