Skip to content

Commit

Permalink
UTs
Browse files Browse the repository at this point in the history
  • Loading branch information
Abinaya-Shunmugavel committed Jul 18, 2023
1 parent 2c5147b commit 73ddd66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions lib/resources/call.js
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,10 @@ export class Call extends PlivoResource {
params.isVoiceRequest = 'true';
return super.executeAction('Masking/Session/' + this.id, 'DELETE', params);
}
updateMaskingSession(params) {
params.isVoiceRequest = 'true';
return super.executeAction('Masking/Session/' + this.id, 'POST', params);
}
}

const liveCallInterfaceKey = Symbol('liveCallInterface');
Expand Down
8 changes: 4 additions & 4 deletions test/calls.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,13 @@ describe('calls', function () {
callTimeLimit: 14600,
},
).then(function (response) {
assert.equal(response.message, 'session created')
assert.equal(response.message, 'Session created')
})
});
it('should delete a masking session!', function () {
client.calls.deleteMaskingSession("197aa6e0-1abe-4d1c-b887-2b2406764360")
.then(function (response) {
assert.equal(response.message, 'session expired')
assert.equal(response.message, 'Session expired')
})
});
it('should get masking session by session uuid!', function () {
Expand All @@ -316,9 +316,9 @@ describe('calls', function () {
})
});
it('should update masking session using session uuid!', function () {
client.calls.updateMaskingSession("197aa6e0-1abe-4d1c-b887-2b2406764360")
client.calls.updateMaskingSession("63690013-52bb-43fa-9b0b-bf81c9f4d766")
.then(function (response) {
assert.equal(response.message, 'session updated')
assert.equal(response.message, 'Session updated')
})
});
it('should list masking session!', function () {
Expand Down

0 comments on commit 73ddd66

Please sign in to comment.