0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Fixed content-length matcher in posts API test snapshot

refs d5f03ec0b1

- underlying error message varies across node versions so the content-length can't be fixed
- applied any-content-length matcher to the right test this time
This commit is contained in:
Kevin Ansfield 2022-09-19 16:37:54 +01:00
parent 1cc8176d4f
commit b2b6be9cb5
2 changed files with 5 additions and 5 deletions

View file

@ -468,7 +468,7 @@ exports[`Posts API Create Errors with an invalid lexical state object 2: [header
Object {
"access-control-allow-origin": "http://127.0.0.1:2369",
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "337",
"content-length": StringMatching /\\\\d\\+/,
"content-type": "application/json; charset=utf-8",
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
"vary": "Origin, Accept-Encoding",
@ -648,7 +648,7 @@ exports[`Posts API Update Can update a post with lexical 4: [headers] 1`] = `
Object {
"access-control-allow-origin": "http://127.0.0.1:2369",
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": StringMatching /\\\\d\\+/,
"content-length": "3691",
"content-type": "application/json; charset=utf-8",
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
"vary": "Origin, Accept-Encoding",

View file

@ -203,7 +203,8 @@ describe('Posts API', function () {
}]
})
.matchHeaderSnapshot({
etag: anyEtag
etag: anyEtag,
'content-length': anyStringNumber
});
});
});
@ -291,8 +292,7 @@ describe('Posts API', function () {
})
.matchHeaderSnapshot({
etag: anyEtag,
'x-cache-invalidate': anyString,
'content-length': anyStringNumber
'x-cache-invalidate': anyString
});
// post revisions are created