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:
parent
1126997244
commit
26d0f48561
2 changed files with 2 additions and 2 deletions
|
@ -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]
|
||||
})
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Add table
Reference in a new issue