mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Corrected regression test for dynamic routing
no issue
- The reason for the test failure was:
- Bump in express version: 5a316c3c80
)
- Which included bump of it's internal dependency `send` to version send@0.17.1: https://github.com/expressjs/express/releases/tag/4.17.0)
- Which had a change in how 'xml' type was interpreted: https://github.com/pillarjs/send/pull/154/files
- Because in Ghost documentation for dynamic routing, we clearly state to use `contetn_type: text/xml` instead of just `content_type:xml` the test was considered to be not up to date (ref. https://docs.ghost.org/api/handlebars-themes/routing/routes/)
- Returning `content-type: text/xml; charset=UTF-8` stays in line with the rest of Ghost codebase
- WARNING: when using `res.type('xml')` for whatever reason in the codebase be awere that express will send `application/xml` header which is not the convention used throughout the codebase
This commit is contained in:
parent
5aa0a2134b
commit
82e16a749e
1 changed files with 2 additions and 2 deletions
|
@ -1632,7 +1632,7 @@ describe('Integration - Web - Site', function () {
|
|||
'/about/': 'about',
|
||||
'/podcast/rss/': {
|
||||
templates: ['podcast/rss'],
|
||||
content_type: 'xml'
|
||||
content_type: 'text/xml'
|
||||
},
|
||||
'/cooking/': {
|
||||
controller: 'channel',
|
||||
|
@ -3376,7 +3376,7 @@ describe('Integration - Web - Site', function () {
|
|||
'/about/': 'about',
|
||||
'/podcast/rss/': {
|
||||
templates: ['podcast/rss'],
|
||||
content_type: 'xml'
|
||||
content_type: 'text/xml'
|
||||
},
|
||||
'/cooking/': {
|
||||
controller: 'channel',
|
||||
|
|
Loading…
Add table
Reference in a new issue