Skip to content

Commit c24e211

Browse files
committed
Enhanced the unit test to include sample response
1 parent 5b718d7 commit c24e211

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

voice/transcription_test.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,18 @@ func TestTranscriptionGetContents(t *testing.T) {
2828
}
2929

3030
func TestCreateTranscription(t *testing.T) {
31-
mbClient, ok := testClient(t)
32-
if !ok {
33-
t.SkipNow()
34-
}
31+
mbClient, stop := testRequest(http.StatusOK, []byte(`{
32+
"data": [
33+
{
34+
"id": "00000000-1111-2222-3333-444444444444",
35+
"recordingId": "55555555-6666-7777-8888-999999999999",
36+
"error": null,
37+
"createdAt": "2011-01-01T02:03:04Z",
38+
"updatedAt": "2011-01-02T03:04:05Z"
39+
}
40+
]
41+
}`))
42+
defer stop()
3543

3644
callID, legID, recordingID := "7777777", "88888888", "999999999"
3745

0 commit comments

Comments
 (0)