Skip to content

Commit

Permalink
Subscribe: Success with subid
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydwatkin committed Jun 22, 2013
1 parent 3da89ca commit 405f0f4
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion test/lib/pubsub.subscribe.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,26 @@ describe('Publish-Subscribe', function() {
callback
)
})


it('Handles success response with subscription id', function(done) {
xmpp.once('stanza', function(stanza) {
manager.makeCallback(helper.getStanza('subscribe-subid'))
})
var callback = function(error, success) {
should.not.exist(error)
success.id.should.equal('123456')
done()
}
var request = {
to: 'pubsub.shakespeare.lit',
node: 'twelfth night'
}
socket.emit(
'xmpp.pubsub.subscribe',
request,
callback
)
})
})

})

0 comments on commit 405f0f4

Please sign in to comment.