diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2020-12-04 22:13:11 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-12-08 10:40:08 +0100 |
commit | 2805cb7cb68cae0f25bd43f166e4a6b8501d41eb (patch) | |
tree | e80b70812787359aef59adc37fd546f992f2093e /server/tests/plugins/plugin-router.ts | |
parent | f17faefb30e4872688a1c0dafcc6c793242750f4 (diff) | |
download | PeerTube-2805cb7cb68cae0f25bd43f166e4a6b8501d41eb.tar.gz PeerTube-2805cb7cb68cae0f25bd43f166e4a6b8501d41eb.tar.zst PeerTube-2805cb7cb68cae0f25bd43f166e4a6b8501d41eb.zip |
server/mw/oauth: res.loc.auth to true upon auth
Setting res.locals.authenticated explicity to
true makes it's more clear whether the req is
authenticated when using optionalAuthenticate
middlware.
Diffstat (limited to 'server/tests/plugins/plugin-router.ts')
-rw-r--r-- | server/tests/plugins/plugin-router.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/tests/plugins/plugin-router.ts b/server/tests/plugins/plugin-router.ts index 5392acc51..24e6a1e83 100644 --- a/server/tests/plugins/plugin-router.ts +++ b/server/tests/plugins/plugin-router.ts | |||
@@ -53,7 +53,7 @@ describe('Test plugin helpers', function () { | |||
53 | statusCodeExpected: 200 | 53 | statusCodeExpected: 200 |
54 | }) | 54 | }) |
55 | 55 | ||
56 | expect(res.body.isAuthenticated).to.equal(undefined) | 56 | expect(res.body.isAuthenticated).to.equal(true) |
57 | 57 | ||
58 | const secRes = await makeGetRequest({ | 58 | const secRes = await makeGetRequest({ |
59 | url: server.url, | 59 | url: server.url, |