]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/plugins/plugin-helpers.ts
Increase tests timeout
[github/Chocobozzz/PeerTube.git] / server / tests / plugins / plugin-helpers.ts
index 2ac070b41026156dbf344bfb01209bc9bb0914f4..f72de82296fc7a906251181d8bd9ce50e471ff61 100644 (file)
@@ -117,13 +117,11 @@ describe('Test plugin helpers', function () {
   describe('User', function () {
 
     it('Should not get a user if not authenticated', async function () {
-      const res = await makeGetRequest({
+      await makeGetRequest({
         url: servers[0].url,
         path: '/plugins/test-four/router/user',
-        statusCodeExpected: HttpStatusCode.OK_200
+        statusCodeExpected: HttpStatusCode.NOT_FOUND_404
       })
-
-      expect(res.body.user).to.be.undefined
     })
 
     it('Should get a user if authenticated', async function () {
@@ -134,8 +132,8 @@ describe('Test plugin helpers', function () {
         statusCodeExpected: HttpStatusCode.OK_200
       })
 
-      expect(res.body.user).to.exist
       expect(res.body.username).to.equal('root')
+      expect(res.body.displayName).to.equal('root')
       expect(res.body.isAdmin).to.be.true
       expect(res.body.isModerator).to.be.false
       expect(res.body.isUser).to.be.false