mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -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']
|
themes: ['POST']
|
||||||
};
|
};
|
||||||
|
|
||||||
const match = req.url.match(/^\/(\w+)\//);
|
const match = req.url.match(/^\/(\w+)\/?/);
|
||||||
|
|
||||||
if (match) {
|
if (match) {
|
||||||
const entity = match[1];
|
const entity = match[1];
|
||||||
|
|
|
@ -60,7 +60,7 @@ describe('Admin API V2 key authentication', function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
return request
|
return request
|
||||||
.post(localUtils.API.getApiQuery('posts'))
|
.post(localUtils.API.getApiQuery('posts/'))
|
||||||
.set('Origin', config.get('url'))
|
.set('Origin', config.get('url'))
|
||||||
.set('Authorization', `Ghost ${localUtils.getValidAdminToken(localUtils.API.getApiQuery('posts'))}`)
|
.set('Authorization', `Ghost ${localUtils.getValidAdminToken(localUtils.API.getApiQuery('posts'))}`)
|
||||||
.send({
|
.send({
|
||||||
|
@ -68,6 +68,6 @@ describe('Admin API V2 key authentication', function () {
|
||||||
})
|
})
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
.expect('Cache-Control', testUtils.cacheRules.private)
|
.expect('Cache-Control', testUtils.cacheRules.private)
|
||||||
.expect(501);
|
.expect(201);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue