diff options
author | Chocobozzz <me@florianbigard.com> | 2022-12-29 15:31:40 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-01-04 11:41:29 +0100 |
commit | 7e0c26066a5c59af742ae56bddaff9635debe034 (patch) | |
tree | 405a97a1c8a7c79c62c620406e6556d2c53c4d97 /server/tests/plugins | |
parent | b65f5367baf799b425be0bcfb9220922751bb6eb (diff) | |
download | PeerTube-7e0c26066a5c59af742ae56bddaff9635debe034.tar.gz PeerTube-7e0c26066a5c59af742ae56bddaff9635debe034.tar.zst PeerTube-7e0c26066a5c59af742ae56bddaff9635debe034.zip |
External auth can set more user fields
videoQuota, videoQuotaDaily, adminFlags
Diffstat (limited to 'server/tests/plugins')
-rw-r--r-- | server/tests/plugins/external-auth.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/tests/plugins/external-auth.ts b/server/tests/plugins/external-auth.ts index 437777e90..ee78ae5aa 100644 --- a/server/tests/plugins/external-auth.ts +++ b/server/tests/plugins/external-auth.ts | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | import { expect } from 'chai' | 3 | import { expect } from 'chai' |
4 | import { wait } from '@shared/core-utils' | 4 | import { wait } from '@shared/core-utils' |
5 | import { HttpStatusCode, UserRole } from '@shared/models' | 5 | import { HttpStatusCode, UserAdminFlag, UserRole } from '@shared/models' |
6 | import { | 6 | import { |
7 | cleanupTests, | 7 | cleanupTests, |
8 | createSingleServer, | 8 | createSingleServer, |
@@ -156,6 +156,9 @@ describe('Test external auth plugins', function () { | |||
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.id).to.equal(UserRole.USER) | 158 | expect(body.role.id).to.equal(UserRole.USER) |
159 | expect(body.adminFlags).to.equal(UserAdminFlag.NONE) | ||
160 | expect(body.videoQuota).to.equal(5242880) | ||
161 | expect(body.videoQuotaDaily).to.equal(-1) | ||
159 | } | 162 | } |
160 | }) | 163 | }) |
161 | 164 | ||
@@ -178,6 +181,9 @@ describe('Test external auth plugins', function () { | |||
178 | expect(body.account.displayName).to.equal('Kefka Palazzo') | 181 | expect(body.account.displayName).to.equal('Kefka Palazzo') |
179 | expect(body.email).to.equal('kefka@example.com') | 182 | expect(body.email).to.equal('kefka@example.com') |
180 | expect(body.role.id).to.equal(UserRole.ADMINISTRATOR) | 183 | expect(body.role.id).to.equal(UserRole.ADMINISTRATOR) |
184 | expect(body.adminFlags).to.equal(UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST) | ||
185 | expect(body.videoQuota).to.equal(42000) | ||
186 | expect(body.videoQuotaDaily).to.equal(42100) | ||
181 | } | 187 | } |
182 | }) | 188 | }) |
183 | 189 | ||