Skip to content

Commit

Permalink
add fax send specs
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasassisrosa committed Jul 8, 2020
1 parent ddb7e27 commit b76a0cb
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/resources/Faxes.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,32 @@ describe('Faxes Resource', function () {
});
});

describe('send', function () {
function responseFn(response) {
// expect(response.data).to.have.property('fax_id');
expect(response.data).to.have.property('connection_id');
expect(response.data).to.have.property('media_url');
expect(response.data).to.have.property('to');
// expect(response.data).to.include({record_type: 'fax'});
}

it('Sends the correct request', function () {
return telnyx.faxes.send(faxCreateData).then(responseFn);
});

it('Sends the correct request [with specified auth]', function () {
return telnyx.faxes
.send(faxCreateData, TEST_AUTH_KEY)
.then(responseFn);
});

it('Sends the correct request [with specified auth in options]', function () {
return telnyx.faxes
.send(faxCreateData, {api_key: TEST_AUTH_KEY})
.then(responseFn);
});
});

describe('list', function () {
function responseFn(response) {
// expect(response.data[0]).to.have.property('fax_id');
Expand Down

0 comments on commit b76a0cb

Please sign in to comment.