b0VIM 7.3"OHPåe< steviegrahamSG-2.local~steviegraham/Code/twilio-js/spec/queue.spec.jsutf-8 3210#"! UtpLvo*åad,xLÕ©¨rBAì뻨rT8È ¾ ½ 3    ý ü ´ ¥ ¤ R =  ÿ à Å ‰ } |  ù ‹ u d X N  î í ± ˜ t R ( ɹW/é×v4"!òÖ¿­ƒyxtskaUC-·,+èͦˆiM' êQPF óβ”zD1 }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); done() api.done(); res.destroy(funct }); }); } }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); }); } }); }); }); }); }); done() api.done(); res.destroy(function(err, res) { }); body: {"Url":"foo","Method":"foo","Status":"foo"} statusCode: 200, fixture: 'call_created', method: 'delete', uri: res.uri, chainTo: api, var instanceMock = mock({ Twilio.Queue.create({"FriendlyName":"bob","MaxSize":"Infinity"}, function(err, res) { }); body: {"FriendlyName":"bob","MaxSize":"Infinity"} statusCode: 201, fixture: 'call_created', method: 'post', resource: 'Queues', api = mock({ it('deletes the given resource', function(done) { describe('destroy()', function() { describe('the object it returns', function() { }); }); done() api.done(); for(var prop in res) { if(res.hasOwnProperty(prop)) expect(res[prop]).toEqual(api.response[prop]) } expect(err).toEqual(null); Twilio.Queue.create({"friendlyName":"bob","maxSize":"Infinity"}, function(err, res) { }); body: {"FriendlyName":"bob","MaxSize":"Infinity"} statusCode: 201, fixture: 'queue', method: 'post', resource: 'Queues', api = mock({ it('returns an object representation of the API response', function(done) { var api; describe('on successfully creating a Queues resource', function() { }); }); done(); api.done(); Twilio.Queue.create({"friendlyName":"bob","maxSize":"Infinity","accountSid":"AC0000000000000000000000000000"}, function(err, res) { }); body: {"FriendlyName":"bob","MaxSize":"Infinity"} statusCode: 201, fixture: 'queue', method: 'post', resource: 'Queues', accountSid: 'AC0000000000000000000000000000', api = mock({ it('can use a subaccount', function(done) { describe('.create', function() { var api;describe('Twilio.Queue', function() {Twilio.AuthToken = mock.AuthToken = "secret";Twilio.AccountSid = mock.AccountSid = "SIDneyPoiter";var mock = require('./helpers/mock.js');var Twilio = require('../lib/twilio.js');adõ ¹ *âÇ¥›šnZJ"˸š\/%$ø ä Õ ± © ¨ ,  û à ¾ ´ ³ ‡ d ø ä Õ Ë Ä ¾ º ¹ ¸ }); }); }) }); done() api.done(); for(var prop in res) { if(res.hasOwnProperty(prop)) expect(res[prop]).toEqual(api.response[prop]) } expect(err).toEqual(null); Twilio.Queue.all(function(err, res) { }); fixture: 'list_queues' method: 'get', resource: 'Queues', api = mock({ it('returns informations about how many resources there are including an array of resource instances', function(done) { }); }, { from: '+12125551234' }); done() api.done(); Twilio.Queue.all(function(err, res) { }); body: { From: '+12125551234' } fixture: 'list_queues', method: 'get', resource: 'Queues', api = mock({ it('accepts filter paramters for a more specific query', function(done) { }); }, { accountSid: 'subaccount' }); done(); api.done(); Twilio.Queue.all(function(err, res) { }); fixture: 'list_queues' method: 'get', resource: 'Queues',ad vË  çǦ‰K=Ý Š d E " Ý ¾ ƒ s r  ý ã Í ½ ¯ £ ™ ‘ F /  õ Ô ¼ ² ± v A  Ü Æ µ © Ÿ — ‘ p c b 0  ûá …i_^ ÷ç°¨§wdBæÊÀ¿lXH ƳrW;10ݺN:+!óæå³ ~dF+ ÿþÒ¾®won>+  accountSid: 'subaccount', api = mock({ it('can use a subaccount', function(done) { }); }, { accountSid: 'subaccount', connect: true }); done(); api.done(); Twilio.Queue.all(function(err, res) { }); fixture: 'list_queues' method: 'get', resource: 'Queues', connect: true, accountSid: 'subaccount', api = mock({ it('can use twilio connect', function(done) { var api; describe('.all', function() { }); }) }); done() api.done(); for(var prop in res) { if(res.hasOwnProperty(prop)) expect(res[prop]).toEqual(api.response[prop]) } expect(err).toEqual(null); Twilio.Queue.find('QU90c6fc909d8504d45ecdb3a3d5b3556e', function(err, res) { }); fixture: 'queue' method: 'get', resource: 'Queues/QU90c6fc909d8504d45ecdb3a3d5b3556e', api = mock({ it('returns an object representation of the API response', function(done) { }); }, { accountSid: 'subaccount' }); done(); api.done(); Twilio.Queue.find('QU90c6fc909d8504d45ecdb3a3d5b3556e', function(err, res) { }); fixture: 'queue' method: 'get', resource: 'Queues/QU90c6fc909d8504d45ecdb3a3d5b3556e', accountSid: 'subaccount', api = mock({ it('can use a subaccount', function(done) { }); }, { accountSid: 'subaccount', connect: true }); done(); api.done(); Twilio.Queue.find('QU90c6fc909d8504d45ecdb3a3d5b3556e', function(err, res) { }); fixture: 'queue' method: 'get', resource: 'Queues/QU90c6fc909d8504d45ecdb3a3d5b3556e', connect: true, accountSid: 'subaccount', api = mock({ it('can use twilio connect', function(done) { var api; describe('.find', function() { }); }); }); }); done() api.done(); expect(res).toEqual(null); expect(err).toEqual(new Error(api.response.message)); Twilio.Queue.create({}, function(err, res) { it('should return an error object', function(done) { }); statusCode: 422 fixture: 'api_error', method: 'post', resource: 'Queues', var api = mock({ describe('on unsuccessfully creating a Queues resource', function() { }); }); }); }); }); done(); api.done(); res.save(function() { ["friendlyName", "maxSize"].forEach(function(el) { res[el] = 'foo' }); }); body: {"FriendlyName":"foo","MaxSize":"foo"} statusCode: 200, fixture: 'queue', method: 'post', uri: res.uri, chainTo: api, var instanceMock = mock({ // Assert a POST is made to the resource URI with the given parameters Twilio.Queue.create({"friendlyName":"bob","maxSize":"Infinity"}, function(err, res) { }); body: {"FriendlyName":"bob","MaxSize":"Infinity"} statusCode: 201, fixture: 'queue', method: 'post', resource: 'Queues', api = mock({ it('has setters corresponding to the mutable properties of the resource the object represents, that update the resource when .save() is called.', function(done) { describe('the object it returns', function() {