Skip to content

Commit

Permalink
Add tests for Queue model
Browse files Browse the repository at this point in the history
  • Loading branch information
beeman committed Aug 2, 2016
1 parent 2f894f0 commit b44f3c6
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,29 @@ describe('Main component config', function() {
})

})


describe('Queue model', function() {

const Queue = app.models.Queue

it('should have created the Queue model', function() {
expect(Queue).to.be.a('function')
expect(Queue.status).to.be.a('function')
expect(Queue.queues).to.be.a('function')
})

it('should be able to get the server status', function() {
Queue.status()
.then(res => expect(res).to.be.an('object'))
})

it('should be able to get the server queues', function() {
Queue.queues()
.then(res => {
expect(res).to.be.an('array')
expect(res.length).to.equal(1)
})
})

})

0 comments on commit b44f3c6

Please sign in to comment.