0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Renamed getValidAdminKey to getValidAdminToken for admin api v2 test area

no issue
This commit is contained in:
kirrg001 2019-01-18 19:11:51 +01:00
parent 1126997244
commit 26d0f48561
2 changed files with 2 additions and 2 deletions

View file

@ -36,7 +36,7 @@ describe('Posts API V2', function () {
return request
.post(localUtils.API.getApiQuery('posts'))
.set('Origin', config.get('url'))
.set('Authorization', `Ghost ${localUtils.getValidAdminKey(localUtils.API.getApiQuery('posts'))}`)
.set('Authorization', `Ghost ${localUtils.getValidAdminToken(localUtils.API.getApiQuery('posts'))}`)
.send({
posts: [post]
})

View file

@ -101,7 +101,7 @@ module.exports = {
return testUtils.API.doAuth(`${API_URL}session/`, ...args);
},
getValidAdminKey(endpoint) {
getValidAdminToken(endpoint) {
const jwt = require('jsonwebtoken');
const JWT_OPTIONS = {
algorithm: 'HS256'