Skip to content

Commit 0e4e71e

Browse files
author
Dirk Hoekstra
committed
Test improvements
1 parent b307b7e commit 0e4e71e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

message_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,15 @@ func TestRequestDataForMessage(t *testing.T) {
474474
t.Fatalf("Didn't expect error while getting request data for message: %s", err)
475475
}
476476

477+
if request.Originator != "MSGBIRD" {
478+
t.Errorf("Unexpected originator: %s, expected: MSGBIRD", request.Originator)
479+
}
480+
if request.Recipients[0] != "31612345678" {
481+
t.Errorf("Unexpected recipient: %s, expected: 31612345678", request.Recipients[0])
482+
}
483+
if request.Body != "MyBody" {
484+
t.Errorf("Unexpected body: %s, expected: MyBody", request.Body)
485+
}
477486
if request.Type != messageParams.Type {
478487
t.Errorf("Unexpected type: %s, expected: %s", request.Type, messageParams.Type)
479488
}

voice_message_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ func TestRequestDataForVoiceMessage(t *testing.T) {
245245
if request.Recipients[0] != "31612345678" {
246246
t.Errorf("Unexpected recipient: %s, expected: 31612345678", request.Recipients[0])
247247
}
248+
if request.Body != "MyBody" {
249+
t.Errorf("Unexpected body: %s, expected: MyBody", request.Body)
250+
}
248251
if request.Reference != "MyReference" {
249252
t.Errorf("Unexpected reference: %s, expected: MyReference", request.Reference)
250253
}

0 commit comments

Comments
 (0)