mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-05 19:57:02 +00:00
gateway: Test ReadyEvent.Version
This commit is contained in:
parent
6b835a58c7
commit
816a53b1e1
|
@ -3,11 +3,13 @@ package gateway
|
|||
import (
|
||||
"context"
|
||||
"log"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/diamondburned/arikawa/v3/api"
|
||||
"github.com/diamondburned/arikawa/v3/internal/testenv"
|
||||
"github.com/diamondburned/arikawa/v3/utils/ws"
|
||||
)
|
||||
|
@ -150,6 +152,9 @@ func gatewayOpenAndSpin(t *testing.T, ctx context.Context, g *Gateway) {
|
|||
if g.state.SessionID != data.SessionID {
|
||||
t.Fatal("missing SessionID")
|
||||
}
|
||||
if strconv.Itoa(data.Version) != api.Version {
|
||||
t.Fatalf("mismatch version, got %d", data.Version)
|
||||
}
|
||||
log.Println("Bot's username is", data.User.Username)
|
||||
reconnect()
|
||||
case *ResumedEvent:
|
||||
|
|
Loading…
Reference in a new issue