1
0
Fork 0
mirror of synced 2025-04-04 21:53:37 +03:00

fix for tests, update test matrix

This commit is contained in:
Pavel 2021-08-24 10:06:17 +03:00
parent f1ee2d1137
commit 085cbb6402
3 changed files with 9 additions and 9 deletions

View file

@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.11', '1.12', '1.13', '1.14', '1.15']
go-version: ['1.11', '1.12', '1.13', '1.14', '1.15', '1.16', '1.17']
steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v2

View file

@ -374,7 +374,7 @@ func (m *Messenger) dispatch(r Receive) {
}
resp := &Response{
to: Recipient{info.Sender.ID},
to: Recipient{ID: info.Sender.ID},
token: m.token,
sendAPIVersion: m.sendAPIVersion,
}
@ -436,7 +436,7 @@ func (m *Messenger) dispatch(r Receive) {
// Response returns new Response object.
func (m *Messenger) Response(to int64) *Response {
return &Response{
to: Recipient{to},
to: Recipient{ID: to},
token: m.token,
sendAPIVersion: m.sendAPIVersion,
}

View file

@ -106,7 +106,7 @@ func TestMessenger_Dispatch(t *testing.T) {
messages := []MessageInfo{
{
Sender: Sender{111},
Recipient: Recipient{222},
Recipient: Recipient{ID: 222},
// 2018-11-24 21:31:51 UTC + 999ms
Timestamp: 1543095111999,
Message: &Message{},
@ -138,7 +138,7 @@ func TestMessenger_Dispatch(t *testing.T) {
messages := []MessageInfo{
{
Sender: Sender{111},
Recipient: Recipient{222},
Recipient: Recipient{ID: 222},
// 2018-11-24 21:31:51 UTC + 999ms
Timestamp: 1543095111999,
Delivery: &Delivery{},
@ -170,7 +170,7 @@ func TestMessenger_Dispatch(t *testing.T) {
messages := []MessageInfo{
{
Sender: Sender{111},
Recipient: Recipient{222},
Recipient: Recipient{ID: 222},
// 2018-11-24 21:31:51 UTC + 999ms
Timestamp: 1543095111999,
Read: &Read{},
@ -205,7 +205,7 @@ func TestMessenger_Dispatch(t *testing.T) {
messages := []MessageInfo{
{
Sender: Sender{111},
Recipient: Recipient{222},
Recipient: Recipient{ID: 222},
// 2018-11-24 21:31:51 UTC + 999ms
Timestamp: 1543095111999,
PostBack: &PostBack{},
@ -240,7 +240,7 @@ func TestMessenger_Dispatch(t *testing.T) {
messages := []MessageInfo{
{
Sender: Sender{111},
Recipient: Recipient{222},
Recipient: Recipient{ID: 222},
// 2018-11-24 21:31:51 UTC + 999ms
Timestamp: 1543095111999,
OptIn: &OptIn{},
@ -275,7 +275,7 @@ func TestMessenger_Dispatch(t *testing.T) {
messages := []MessageInfo{
{
Sender: Sender{111},
Recipient: Recipient{222},
Recipient: Recipient{ID: 222},
// 2018-11-24 21:31:51 UTC + 999ms
Timestamp: 1543095111999,
ReferralMessage: &ReferralMessage{},