]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/plugins/id-and-pass-auth.ts
Merge branch 'release/4.3.0' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / plugins / id-and-pass-auth.ts
index 85faac5a887e6a7bb12a3d12f10f11eaf144f9b2..fc24a56564b2a5f638446257a333a028c5752b3e 100644 (file)
@@ -48,7 +48,7 @@ describe('Test id and pass auth plugins', function () {
 
     expect(body.username).to.equal('spyro')
     expect(body.account.displayName).to.equal('Spyro the Dragon')
-    expect(body.role).to.equal(UserRole.USER)
+    expect(body.role.id).to.equal(UserRole.USER)
   })
 
   it('Should login Crash, create the user and use the token', async function () {
@@ -63,7 +63,7 @@ describe('Test id and pass auth plugins', function () {
 
       expect(body.username).to.equal('crash')
       expect(body.account.displayName).to.equal('Crash Bandicoot')
-      expect(body.role).to.equal(UserRole.MODERATOR)
+      expect(body.role.id).to.equal(UserRole.MODERATOR)
     }
   })
 
@@ -79,7 +79,7 @@ describe('Test id and pass auth plugins', function () {
 
       expect(body.username).to.equal('laguna')
       expect(body.account.displayName).to.equal('laguna')
-      expect(body.role).to.equal(UserRole.USER)
+      expect(body.role.id).to.equal(UserRole.USER)
     }
   })
 
@@ -129,7 +129,7 @@ describe('Test id and pass auth plugins', function () {
     expect(body.username).to.equal('crash')
     expect(body.account.displayName).to.equal('Beautiful Crash')
     expect(body.account.description).to.equal('Mutant eastern barred bandicoot')
-    expect(body.role).to.equal(UserRole.MODERATOR)
+    expect(body.role.id).to.equal(UserRole.MODERATOR)
   })
 
   it('Should reject token of laguna by the plugin hook', async function () {