@@ -193,14 +193,14 @@ describe("SipPeer", function(){
193193 peer . moveTns ( data , done ) ;
194194 } ) ;
195195 } ) ;
196- describe ( "#listApplications " , function ( ) {
197- it ( "should list applications " , function ( done ) {
196+ describe ( "#listApplication " , function ( ) {
197+ it ( "should list application " , function ( done ) {
198198 var span = helper . nock ( ) . get ( "/accounts/FakeAccountId/sites/1/sippeers/10/products/messaging/applicationSettings" ) . reply ( 200 , helper . xml . peerApplications , { "Content-Type" : "application/xml" } ) ;
199199 var peer = new SipPeer ( ) ;
200200 peer . id = 10 ;
201201 peer . siteId = 1 ;
202202 peer . client = helper . createClient ( ) ;
203- peer . listApplications ( function ( err , results ) {
203+ peer . listApplication ( function ( err , results ) {
204204 if ( err ) {
205205 done ( err ) ;
206206 } else {
@@ -210,34 +210,34 @@ describe("SipPeer", function(){
210210 } ) ;
211211 } ) ;
212212 } ) ;
213- describe ( "#editApplications " , function ( ) {
214- it ( "should edit applications " , function ( done ) {
213+ describe ( "#editApplication " , function ( ) {
214+ it ( "should edit the application " , function ( done ) {
215215 var appData = { httpMessagingV2AppId : 100 }
216216 var span = helper . nock ( ) . put ( "/accounts/FakeAccountId/sites/1/sippeers/10/products/messaging/applicationSettings" , helper . buildXml ( { applicationsSettings : appData } ) ) . reply ( 200 , helper . xml . peerApplications , { "Content-Type" : "application/xml" } ) ;
217217 var peer = new SipPeer ( ) ;
218218 peer . id = 10 ;
219219 peer . siteId = 1 ;
220220 peer . client = helper . createClient ( ) ;
221- var appData = [ { httpMessagingV2AppId : 100 } ]
222- peer . editApplications ( appData , function ( err , results ) {
221+ var appData = { httpMessagingV2AppId : 100 }
222+ peer . editApplication ( appData , function ( err , results ) {
223223 if ( err ) {
224224 done ( err ) ;
225225 } else {
226- results . httpMessagingV2AppId [ 0 ] . should . equal ( 100 )
226+ results . httpMessagingV2AppId . should . equal ( 100 )
227227 done ( ) ;
228228 }
229229 } ) ;
230230 } ) ;
231231 } ) ;
232- describe ( "#removeApplications " , function ( ) {
233- it ( "should remove applications " , function ( done ) {
232+ describe ( "#removeApplication " , function ( ) {
233+ it ( "should remove application " , function ( done ) {
234234 var appData = 'REMOVE' ;
235235 var span = helper . nock ( ) . put ( "/accounts/FakeAccountId/sites/1/sippeers/10/products/messaging/applicationSettings" , helper . buildXml ( { applicationsSettings : appData } ) ) . reply ( 200 , helper . xml . peerApplications , { "Content-Type" : "application/xml" } ) ;
236236 var peer = new SipPeer ( ) ;
237237 peer . id = 10 ;
238238 peer . siteId = 1 ;
239239 peer . client = helper . createClient ( ) ;
240- peer . removeApplications ( done ) ;
240+ peer . removeApplication ( done ) ;
241241 } ) ;
242242 } ) ;
243243
0 commit comments