mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Fixed AMP test for 'static pages'
no issue - 'static pages' (post of a page type) were not supported in v0.1 API - this is where the 404 is comming from -df7e64fafa/core/frontend/apps/amp/lib/router.js (L66)
. and it was handled in rather late stage before -df7e64fafa/core/frontend/apps/amp/lib/router.js (L24)
- after moveing to v2 API the later stage doesn't happen so the entry lookup helper doesn't have anough infomration to tell if it's a 'Post' or 'Page' is being requested
This commit is contained in:
parent
c411795741
commit
4876f5fc13
1 changed files with 3 additions and 1 deletions
|
@ -359,10 +359,12 @@ describe('Frontend Routing', function () {
|
|||
|
||||
describe('amp', function () {
|
||||
it('should 404 for amp parameter', function (done) {
|
||||
// NOTE: only post pages are supported so the router doesn't have a way to distinguish if
|
||||
// the request was done after AMP 'Page' or 'Post'
|
||||
request.get('/static-page-test/amp/')
|
||||
.expect('Cache-Control', testUtils.cacheRules.private)
|
||||
.expect(404)
|
||||
.expect(/Page not found/)
|
||||
.expect(/Post not found/)
|
||||
.end(doEnd(done));
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue