]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/users/users.ts
correct error codes and backward compat
[github/Chocobozzz/PeerTube.git] / server / tests / api / users / users.ts
index cea98aac7b9f9fc40d9434927f80a0f427f06f05..464c11d3452247252dfb7117f687423e2e5b5457 100644 (file)
@@ -95,6 +95,8 @@ describe('Test users', function () {
 
       expect(res.body.code).to.equal('invalid_client')
       expect(res.body.error).to.contain('client is invalid')
+      expect(res.body.type.startsWith('https://')).to.be.true
+      expect(res.body.type).to.contain('invalid_client')
     })
 
     it('Should not login with an invalid client secret', async function () {
@@ -103,6 +105,8 @@ describe('Test users', function () {
 
       expect(res.body.code).to.equal('invalid_client')
       expect(res.body.error).to.contain('client is invalid')
+      expect(res.body.type.startsWith('https://')).to.be.true
+      expect(res.body.type).to.contain('invalid_client')
     })
   })
 
@@ -114,6 +118,8 @@ describe('Test users', function () {
 
       expect(res.body.code).to.equal('invalid_grant')
       expect(res.body.error).to.contain('credentials are invalid')
+      expect(res.body.type.startsWith('https://')).to.be.true
+      expect(res.body.type).to.contain('invalid_grant')
     })
 
     it('Should not login with an invalid password', async function () {
@@ -122,6 +128,8 @@ describe('Test users', function () {
 
       expect(res.body.code).to.equal('invalid_grant')
       expect(res.body.error).to.contain('credentials are invalid')
+      expect(res.body.type.startsWith('https://')).to.be.true
+      expect(res.body.type).to.contain('invalid_grant')
     })
 
     it('Should not be able to upload a video', async function () {