aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-10-28 16:15:04 +0200
committerChocobozzz <me@florianbigard.com>2022-10-28 16:34:08 +0200
commit9e5cf66be7ad897e106f283bee73a165c72e74de (patch)
tree16de6f775c412281236b8f99be8e5118e5a6ff71 /server/tests/plugins
parent3f9decbd01d25f1b1805e2764dff4beae7d36c19 (diff)
downloadPeerTube-9e5cf66be7ad897e106f283bee73a165c72e74de.tar.gz
PeerTube-9e5cf66be7ad897e106f283bee73a165c72e74de.tar.zst
PeerTube-9e5cf66be7ad897e106f283bee73a165c72e74de.zip
Breaking API: Consistency with role id/label
Diffstat (limited to 'server/tests/plugins')
-rw-r--r--server/tests/plugins/external-auth.ts6
-rw-r--r--server/tests/plugins/id-and-pass-auth.ts8
2 files changed, 7 insertions, 7 deletions
diff --git a/server/tests/plugins/external-auth.ts b/server/tests/plugins/external-auth.ts
index e08b83791..437777e90 100644
--- a/server/tests/plugins/external-auth.ts
+++ b/server/tests/plugins/external-auth.ts
@@ -155,7 +155,7 @@ describe('Test external auth plugins', function () {
155 expect(body.username).to.equal('cyan') 155 expect(body.username).to.equal('cyan')
156 expect(body.account.displayName).to.equal('cyan') 156 expect(body.account.displayName).to.equal('cyan')
157 expect(body.email).to.equal('cyan@example.com') 157 expect(body.email).to.equal('cyan@example.com')
158 expect(body.role).to.equal(UserRole.USER) 158 expect(body.role.id).to.equal(UserRole.USER)
159 } 159 }
160 }) 160 })
161 161
@@ -177,7 +177,7 @@ describe('Test external auth plugins', function () {
177 expect(body.username).to.equal('kefka') 177 expect(body.username).to.equal('kefka')
178 expect(body.account.displayName).to.equal('Kefka Palazzo') 178 expect(body.account.displayName).to.equal('Kefka Palazzo')
179 expect(body.email).to.equal('kefka@example.com') 179 expect(body.email).to.equal('kefka@example.com')
180 expect(body.role).to.equal(UserRole.ADMINISTRATOR) 180 expect(body.role.id).to.equal(UserRole.ADMINISTRATOR)
181 } 181 }
182 }) 182 })
183 183
@@ -237,7 +237,7 @@ describe('Test external auth plugins', function () {
237 expect(body.username).to.equal('cyan') 237 expect(body.username).to.equal('cyan')
238 expect(body.account.displayName).to.equal('Cyan Garamonde') 238 expect(body.account.displayName).to.equal('Cyan Garamonde')
239 expect(body.account.description).to.equal('Retainer to the king of Doma') 239 expect(body.account.description).to.equal('Retainer to the king of Doma')
240 expect(body.role).to.equal(UserRole.USER) 240 expect(body.role.id).to.equal(UserRole.USER)
241 }) 241 })
242 242
243 it('Should not update an external auth email', async function () { 243 it('Should not update an external auth email', async function () {
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 () {
48 48
49 expect(body.username).to.equal('spyro') 49 expect(body.username).to.equal('spyro')
50 expect(body.account.displayName).to.equal('Spyro the Dragon') 50 expect(body.account.displayName).to.equal('Spyro the Dragon')
51 expect(body.role).to.equal(UserRole.USER) 51 expect(body.role.id).to.equal(UserRole.USER)
52 }) 52 })
53 53
54 it('Should login Crash, create the user and use the token', async function () { 54 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 () {
63 63
64 expect(body.username).to.equal('crash') 64 expect(body.username).to.equal('crash')
65 expect(body.account.displayName).to.equal('Crash Bandicoot') 65 expect(body.account.displayName).to.equal('Crash Bandicoot')
66 expect(body.role).to.equal(UserRole.MODERATOR) 66 expect(body.role.id).to.equal(UserRole.MODERATOR)
67 } 67 }
68 }) 68 })
69 69
@@ -79,7 +79,7 @@ describe('Test id and pass auth plugins', function () {
79 79
80 expect(body.username).to.equal('laguna') 80 expect(body.username).to.equal('laguna')
81 expect(body.account.displayName).to.equal('laguna') 81 expect(body.account.displayName).to.equal('laguna')
82 expect(body.role).to.equal(UserRole.USER) 82 expect(body.role.id).to.equal(UserRole.USER)
83 } 83 }
84 }) 84 })
85 85
@@ -129,7 +129,7 @@ describe('Test id and pass auth plugins', function () {
129 expect(body.username).to.equal('crash') 129 expect(body.username).to.equal('crash')
130 expect(body.account.displayName).to.equal('Beautiful Crash') 130 expect(body.account.displayName).to.equal('Beautiful Crash')
131 expect(body.account.description).to.equal('Mutant eastern barred bandicoot') 131 expect(body.account.description).to.equal('Mutant eastern barred bandicoot')
132 expect(body.role).to.equal(UserRole.MODERATOR) 132 expect(body.role.id).to.equal(UserRole.MODERATOR)
133 }) 133 })
134 134
135 it('Should reject token of laguna by the plugin hook', async function () { 135 it('Should reject token of laguna by the plugin hook', async function () {