Skip to content

Commit

Permalink
UT fix
Browse files Browse the repository at this point in the history
  • Loading branch information
prashantp-plivo committed Sep 27, 2022
1 parent 5d0248b commit 9e2d44c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion spec/mocks/streamStartCreateResponse.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"message": "stream started",
"api_id": "69487be8-3ef4-11e7-a51d-0245fa790d9e"
"api_id": "69487be8-3ef4-11e7-a51d-0245fa790d9e",
"stream_id": "69487be8-3ef4-11e7-a51d-0245fa790d77"
}
4 changes: 4 additions & 0 deletions spec/mocks/streamStartCreateResponses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"message": "stream started",
"api_id": "69487be8-3ef4-11e7-a51d-0245fa790d9e"
}
3 changes: 2 additions & 1 deletion spec/resource_calls_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,12 @@ def to_json_list_live(list_object)
it 'start stream' do
id = 'MAXXXXXXXXXXXXXXXXXX'
contents = File.read(Dir.pwd + '/spec/mocks/streamStartCreateResponse.json')
response = File.read(Dir.pwd + '/spec/mocks/streamStartCreateResponses.json')
mock(202, JSON.parse(contents))
expect(JSON.parse(to_json_update(@api.calls
.start_stream(id,
'wss://mystream.ngrok.io/audiostream'))))
.to eql(JSON.parse(contents))
.to eql(JSON.parse(response))
compare_requests(uri: '/v1/Account/MAXXXXXXXXXXXXXXXXXX/Call/' + id + '/Stream/',
method: 'POST',
data: {
Expand Down

0 comments on commit 9e2d44c

Please sign in to comment.