mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Fixed key_authentication_spec.js
no issue - pretty-urls only redirects GET requests currently
This commit is contained in:
parent
63c6d24be1
commit
0a4645ab09
2 changed files with 3 additions and 3 deletions
|
@ -19,7 +19,7 @@ const notImplemented = function (req, res, next) {
|
|||
themes: ['POST']
|
||||
};
|
||||
|
||||
const match = req.url.match(/^\/(\w+)\//);
|
||||
const match = req.url.match(/^\/(\w+)\/?/);
|
||||
|
||||
if (match) {
|
||||
const entity = match[1];
|
||||
|
|
|
@ -60,7 +60,7 @@ describe('Admin API V2 key authentication', function () {
|
|||
};
|
||||
|
||||
return request
|
||||
.post(localUtils.API.getApiQuery('posts'))
|
||||
.post(localUtils.API.getApiQuery('posts/'))
|
||||
.set('Origin', config.get('url'))
|
||||
.set('Authorization', `Ghost ${localUtils.getValidAdminToken(localUtils.API.getApiQuery('posts'))}`)
|
||||
.send({
|
||||
|
@ -68,6 +68,6 @@ describe('Admin API V2 key authentication', function () {
|
|||
})
|
||||
.expect('Content-Type', /json/)
|
||||
.expect('Cache-Control', testUtils.cacheRules.private)
|
||||
.expect(501);
|
||||
.expect(201);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue