 
               # expecting relationship to be created
               expectRelation.toExist params, ->
-                queue.next()
-
-            ->
+                next()
+
+            (next) ->
               # expecting account to be saved as a member
               params =
                 $and : [

JApiToken                     = require '../apitoken'
JInvitation                   = require '../invitation'
{ async
  daisy
  expect
  expectRelation
  withDummyClient

              JSession.one params, (err, data) ->
                expect(err).to.not.exist
                expect(data).to.not.exist
                next()

            (next) ->
              # we cannot add blocked user to group
              group.approveMember account, (err) ->
                expect(err).to.exist
                expect(err.message).to.be.equal 'This account is blocked'
                next()

            (next) ->
              # we should be able to unblock the member
              group.unblockMember adminClient, account.getId(), (err) ->
                expect(err).to.not.exist
                next()

            (next) ->
              # unblocked member can be added again
              group.approveMember account, (err) ->
                expect(err).to.not.exist
                next()

          ]

          async.series queue, done


  describe '#searchMembers()', ->
