From 4afdf8bc275ea6f73527711422af54afe6ab1604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 27 Nov 2020 16:04:44 -0500 Subject: [PATCH] fix: spec, remove old tests --- public/openapi/read/admin/manage/users.yaml | 2 ++ test/controllers-admin.js | 23 --------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/public/openapi/read/admin/manage/users.yaml b/public/openapi/read/admin/manage/users.yaml index c3278c007b..713ccb9c7b 100644 --- a/public/openapi/read/admin/manage/users.yaml +++ b/public/openapi/read/admin/manage/users.yaml @@ -15,6 +15,8 @@ get: type: array items: $ref: ../../../components/schemas/UserObject.yaml#/UserObjectACP + userCount: + type: number page: type: number pageCount: diff --git a/test/controllers-admin.js b/test/controllers-admin.js index 61a6217ed8..fe88abd456 100644 --- a/test/controllers-admin.js +++ b/test/controllers-admin.js @@ -255,29 +255,6 @@ describe('Admin Controllers', function () { }); }); - it('should return 403 if no referer', function (done) { - request(nconf.get('url') + '/api/admin/users/csv', { jar: jar }, function (err, res, body) { - assert.ifError(err); - assert.equal(res.statusCode, 403); - assert.equal(body, '[[error:invalid-origin]]'); - done(); - }); - }); - - it('should return 403 if referer is not /admin/users/csv', function (done) { - request(nconf.get('url') + '/api/admin/users/csv', { - jar: jar, - headers: { - referer: '/topic/1/test', - }, - }, function (err, res, body) { - assert.ifError(err); - assert.equal(res.statusCode, 403); - assert.equal(body, '[[error:invalid-origin]]'); - done(); - }); - }); - it('should load /admin/users/csv', function (done) { request(nconf.get('url') + '/api/admin/users/csv', { jar: jar,