 
     it 'should handle groups correctly', (done) ->
 
-      loginCredentials            = generateCredentials()
-      loginCredentials.groupName  = 'invalidgroupName'
+      loginCredentials = generateCredentials
+        groupName : 'invalidgroupName'
 
       queue = [
 


      loginCredentials = generateCredentials()

      JUser.login null, loginCredentials, (err) ->
        expect(err).to.not.exist
        done()

          setUserPasswordStatus queue, username, 'valid'

        ->
          # expecting successful login
          JUser.login clientId, loginCredentials, (err)->
            expect(err).to.not.exist
            queue.next()
