       request.get ssoTokenLoginRequestParams, (err, res, body) ->
         expect(err).to.not.exist
         expect(res.statusCode).to.be.equal 400
-        expect(body).to.be.equal 'invalid username!'
+        expect(JSON.parse body).to.be.deep.equal { error : apiErrors.invalidUsername }
         done()
 
 

          request.get ssoTokenLoginRequestParams, (err, res, body) ->
            expect(err).to.not.exist
            expect(res.statusCode).to.be.equal 400
            expect(body).to.be.equal 'user is not a member of the group'
            queue.next()

        -> done()

    request.get ssoTokenLoginRequestParams, (err, res, body) ->
      expect(err).to.not.exist
      expect(res.statusCode).to.be.equal 400
      expect(JSON.parse body).to.be.deep.equal { error : apiErrors.missingRequiredQueryParameter }
      done()


