         assert.include response, 'No component found'
         done()
 
-  describe 'component status', ->
+  describe 'cachet component status', ->
     it 'should show component statuses', (done) ->
       components = [
         { name: 'bar', status_name: 'Operational', updated_at: 'date' },

        done()

    it 'should deal with API errors', (done) ->
      api.get('/components').reply(500, {})

      helper.converse @robot, @user, '/cachet component status', (envelope, response) ->
        assert.equal response, 'The request to the API has failed (status code = 500)'

        notify:true
      }

      api.post('/incidents', json).reply(400)

      helper.converse @robot, @user, '/incident fixed on foo: msg', (envelope, response) ->
        assert.include response, 'The request to the API has failed (status code = 400)'
        done()

  describe 'cachet status <red|orange|blue|green> <component name>', ->
    it 'should allow to update a component status', (done) ->
      helper.converse @robot, @user, '/cachet component set foo 3', (envelope, response) ->
        assert.include response, 'The component \'foo\' (id = 3) has been set'

      api.put('/components/3', { status: 4 }).reply(200, { data: {
        name: 'foo',
        status_name: 'new status'
      }})

      helper.converse @robot, @user, '/cachet status red foo', (envelope, response) ->
        assert.equal response, 'foo status changed to: *new status*'
        done()

    it 'should deal with API errors', (done) ->
      helper.converse @robot, @user, '/cachet component set foo 3', (envelope, response) ->
        assert.include response, 'The component \'foo\' (id = 3) has been set'

      api.put('/components/3', { status: 2 }).reply(409)

      helper.converse @robot, @user, '/cachet status blue foo', (envelope, response) ->
        assert.equal response, 'The request to the API has failed (status code = 409)'
        done()
