mirror of
https://github.com/donl/plivo-node.git
synced 2026-05-25 22:07:10 -06:00
23 lines
667 B
JavaScript
23 lines
667 B
JavaScript
import assert from 'assert';
|
|
import sinon from 'sinon';
|
|
import {Client} from '../lib/rest/client-test';
|
|
import {PlivoGenericResponse} from '../lib/base.js';
|
|
|
|
let client = new Client('sampleid', 'sammpletoken', 'sampleproxy');
|
|
|
|
describe('PricingInterface', function () {
|
|
it('should get pricings via interface', function () {
|
|
return client.pricings.get('US')
|
|
.then(function(pricings) {
|
|
assert.equal(pricings.countryIso, 'US');
|
|
})
|
|
});
|
|
|
|
it('throw error for country iso', function () {
|
|
return client.pricings.get()
|
|
.catch(function(err) {
|
|
assert.equal(err.message, 'Missing mandatory field: country_iso')
|
|
})
|
|
});
|
|
|
|
});
|