X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fplugins%2Fid-and-pass-auth.ts;h=fc24a56564b2a5f638446257a333a028c5752b3e;hb=77239b425a8e00822a53c9907415832a473c3eb6;hp=85faac5a887e6a7bb12a3d12f10f11eaf144f9b2;hpb=e0faa8ad6e18ce6248ef1ec93a59dab5b05be468;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/plugins/id-and-pass-auth.ts b/server/tests/plugins/id-and-pass-auth.ts index 85faac5a8..fc24a5656 100644 --- a/server/tests/plugins/id-and-pass-auth.ts +++ b/server/tests/plugins/id-and-pass-auth.ts @@ -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 () {