           server.inject(method: 'POST', url: '/', payload: payload(13, 'chan2') )
 
     describe 'channel 1', ->
-      before (done) ->
-        option = 'end'
-        channel_id = 'chan1'
-        done()
+      beforeEach ->
+        server.inject(method: 'POST', url: '/', payload: payload('end', 'chan1') )
+          .then (@res) =>
 
       it 'checks only channel 1 votes', (done) ->
         expect(@res.result.attachments).to

describe 'Index Route', ->
  option = null
  channel_id = 'C2147483705'

  payload = (option, channel_id) ->
    token: 'd74735605d5e35f005c09054c2f6684c'
    team_id: 'T0001'
    team_domain: 'example'

    req =
      method: 'POST'
      url: '/'
      payload: payload(option)

    server.inject(req).then (@res) =>

