           queue.next()
 
       ->
+        # expecting invitation to be created with correct data
+        params = { email : inviteeEmail }
+
+        JInvitation.one params, (err, invitation) ->
+          expect(err)                   .to.not.exist
+          expect(invitation)            .to.exist
+          expect(invitation.code)       .to.exist
+          expect(invitation.email)      .to.be.equal inviteeEmail
+          expect(invitation.status)     .to.be.equal 'pending'
+          expect(invitation.groupName)  .to.be.equal slug
+          queue.next()
+
+      ->
         # expecting session to be created
         params = { username }
 

          expect(err)               .to.not.exist
          expect(session)           .to.exist
          expect(session.username)  .to.be.equal username
          queue.next()

      -> done()

JGroup                              = null
JAccount                            = null
JSession                            = null
JInvitation                         = null
JDomainAlias                        = null


