mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
162 lines
5.7 KiB
Text
162 lines
5.7 KiB
Text
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`Comments API when authenticated Can browse all comments of a post 1: [body] 1`] = `
|
|
Object {
|
|
"comments": Array [
|
|
Object {
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"edited_at": null,
|
|
"html": "<p>First.</p>",
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"liked": Any<Boolean>,
|
|
"likes_count": Any<Number>,
|
|
"member": Object {
|
|
"avatar_image": null,
|
|
"bio": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"name": "Mr Egg",
|
|
},
|
|
"status": "published",
|
|
},
|
|
Object {
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"edited_at": null,
|
|
"html": "<p>Really original</p>",
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"liked": Any<Boolean>,
|
|
"likes_count": Any<Number>,
|
|
"member": Object {
|
|
"avatar_image": null,
|
|
"bio": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"name": null,
|
|
},
|
|
"status": "published",
|
|
},
|
|
Object {
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"edited_at": null,
|
|
"html": "This is a message",
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"liked": Any<Boolean>,
|
|
"likes_count": Any<Number>,
|
|
"member": Object {
|
|
"avatar_image": null,
|
|
"bio": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"name": null,
|
|
},
|
|
"status": "published",
|
|
},
|
|
],
|
|
"meta": Object {
|
|
"pagination": Object {
|
|
"limit": 15,
|
|
"next": null,
|
|
"page": 1,
|
|
"pages": 1,
|
|
"prev": null,
|
|
"total": 3,
|
|
},
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`Comments API when authenticated Can browse all comments of a post 2: [headers] 1`] = `
|
|
Object {
|
|
"access-control-allow-origin": "*",
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
|
"content-length": "872",
|
|
"content-type": "application/json; charset=utf-8",
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
"vary": "Accept-Encoding",
|
|
"x-powered-by": "Express",
|
|
}
|
|
`;
|
|
|
|
exports[`Comments API when authenticated Can comment on a post 1: [body] 1`] = `
|
|
Object {
|
|
"comments": Array [
|
|
Object {
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"edited_at": null,
|
|
"html": "This is a message",
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"liked": false,
|
|
"likes_count": 0,
|
|
"member": null,
|
|
"status": "published",
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`Comments API when authenticated Can comment on a post 2: [headers] 1`] = `
|
|
Object {
|
|
"access-control-allow-origin": "*",
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
|
"content-length": "197",
|
|
"content-type": "application/json; charset=utf-8",
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
"location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/comments\\\\/\\[a-f0-9\\]\\{24\\}\\\\//,
|
|
"vary": "Accept-Encoding",
|
|
"x-powered-by": "Express",
|
|
}
|
|
`;
|
|
|
|
exports[`Comments API when authenticated Can like a comment 1: [headers] 1`] = `
|
|
Object {
|
|
"access-control-allow-origin": "*",
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
"x-powered-by": "Express",
|
|
}
|
|
`;
|
|
|
|
exports[`Comments API when authenticated Can remove a like 1: [headers] 1`] = `
|
|
Object {
|
|
"access-control-allow-origin": "*",
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
"x-powered-by": "Express",
|
|
}
|
|
`;
|
|
|
|
exports[`Comments API when authenticated Cannot like a comment multiple times 1: [body] 1`] = `
|
|
Object {
|
|
"errors": Array [
|
|
Object {
|
|
"code": null,
|
|
"context": null,
|
|
"details": null,
|
|
"ghostErrorCode": null,
|
|
"help": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
"message": "This comment was liked already",
|
|
"property": null,
|
|
"type": "BadRequestError",
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`Comments API when authenticated Cannot like a comment multiple times 1: [headers] 1`] = `
|
|
Object {
|
|
"access-control-allow-origin": "*",
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
"x-powered-by": "Express",
|
|
}
|
|
`;
|
|
|
|
exports[`Comments API when authenticated Cannot like a comment multiple times 2: [headers] 1`] = `
|
|
Object {
|
|
"access-control-allow-origin": "*",
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
|
"content-length": "218",
|
|
"content-type": "application/json; charset=utf-8",
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
"vary": "Accept-Encoding",
|
|
"x-powered-by": "Express",
|
|
}
|
|
`;
|