mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
756f86dbdc
refs https://github.com/TryGhost/Team/issues/1561 With multiple newsletters, unsubscribe links will also need to have a unique reference to the newsletter that the email is for, so that we can unsubscribe members from the particular newsletter automatically when they click on the link. As our existing pattern for members is to use UUID as the external unique reference, this change adds UUID to newsletter schema and populates the existing newsletters with a UUID value. - adds new `uuid` column to newsletter schema - updates newsletter model to add default uuid - updates default newsletter migration to add `uuid` - drops nullable on `uuid` column later in migrations once we have populated existing newsletters
671 lines
26 KiB
Text
671 lines
26 KiB
Text
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`Members API - No Newsletters Can fetch members who are NOT subscribed 1: [body] 1`] = `
|
|
Object {
|
|
"members": Array [
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "with-product@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Dana Barrett",
|
|
"note": null,
|
|
"status": "paid",
|
|
"subscribed": false,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "vip-paid@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Peter Venkman",
|
|
"note": null,
|
|
"status": "paid",
|
|
"subscribed": false,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
],
|
|
"meta": Object {
|
|
"pagination": Object {
|
|
"limit": 15,
|
|
"next": null,
|
|
"page": 1,
|
|
"pages": 1,
|
|
"prev": null,
|
|
"total": 2,
|
|
},
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`Members API - No Newsletters Can fetch members who are NOT subscribed 2: [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": "2028",
|
|
"content-type": "application/json; charset=utf-8",
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
"vary": "Origin, Accept-Encoding",
|
|
"x-powered-by": "Express",
|
|
}
|
|
`;
|
|
|
|
exports[`Members API - No Newsletters Can fetch members who are subscribed 1: [body] 1`] = `
|
|
Object {
|
|
"members": Array [
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "vip@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Winston Zeddemore",
|
|
"note": null,
|
|
"status": "free",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "comped@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Vinz Clortho",
|
|
"note": null,
|
|
"status": "paid",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "trialing@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Ray Stantz",
|
|
"note": null,
|
|
"status": "paid",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "paid@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": 80,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Egon Spengler",
|
|
"note": null,
|
|
"status": "paid",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "member2@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": 50,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": null,
|
|
"note": null,
|
|
"status": "free",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "member1@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Mr Egg",
|
|
"note": null,
|
|
"status": "free",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
],
|
|
"meta": Object {
|
|
"pagination": Object {
|
|
"limit": 15,
|
|
"next": null,
|
|
"page": 1,
|
|
"pages": 1,
|
|
"prev": null,
|
|
"total": 6,
|
|
},
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`Members API - No Newsletters Can fetch members who are subscribed 2: [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": "6501",
|
|
"content-type": "application/json; charset=utf-8",
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
"vary": "Origin, Accept-Encoding",
|
|
"x-powered-by": "Express",
|
|
}
|
|
`;
|
|
|
|
exports[`Members API - With Newsletters - compat mode Can fetch members who are NOT subscribed 1: [body] 1`] = `
|
|
Object {
|
|
"members": Array [
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "with-product@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Dana Barrett",
|
|
"newsletters": Any<Array>,
|
|
"note": null,
|
|
"status": "paid",
|
|
"subscribed": false,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "vip-paid@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Peter Venkman",
|
|
"newsletters": Any<Array>,
|
|
"note": null,
|
|
"status": "paid",
|
|
"subscribed": false,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
],
|
|
"meta": Object {
|
|
"pagination": Object {
|
|
"limit": 15,
|
|
"next": null,
|
|
"page": 1,
|
|
"pages": 1,
|
|
"prev": null,
|
|
"total": 2,
|
|
},
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`Members API - With Newsletters - compat mode Can fetch members who are NOT subscribed 2: [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": "2062",
|
|
"content-type": "application/json; charset=utf-8",
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
"vary": "Origin, Accept-Encoding",
|
|
"x-powered-by": "Express",
|
|
}
|
|
`;
|
|
|
|
exports[`Members API - With Newsletters - compat mode Can fetch members who are subscribed 1: [body] 1`] = `
|
|
Object {
|
|
"members": Array [
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "vip@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Winston Zeddemore",
|
|
"newsletters": Any<Array>,
|
|
"note": null,
|
|
"status": "free",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "comped@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Vinz Clortho",
|
|
"newsletters": Any<Array>,
|
|
"note": null,
|
|
"status": "paid",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "trialing@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Ray Stantz",
|
|
"newsletters": Any<Array>,
|
|
"note": null,
|
|
"status": "paid",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "paid@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": 80,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Egon Spengler",
|
|
"newsletters": Any<Array>,
|
|
"note": null,
|
|
"status": "paid",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "member2@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": 50,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": null,
|
|
"newsletters": Any<Array>,
|
|
"note": null,
|
|
"status": "free",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "member1@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Mr Egg",
|
|
"newsletters": Any<Array>,
|
|
"note": null,
|
|
"status": "free",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
],
|
|
"meta": Object {
|
|
"pagination": Object {
|
|
"limit": 15,
|
|
"next": null,
|
|
"page": 1,
|
|
"pages": 1,
|
|
"prev": null,
|
|
"total": 6,
|
|
},
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`Members API - With Newsletters - compat mode Can fetch members who are subscribed 2: [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": "11136",
|
|
"content-type": "application/json; charset=utf-8",
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
"vary": "Origin, Accept-Encoding",
|
|
"x-powered-by": "Express",
|
|
}
|
|
`;
|
|
|
|
exports[`Members API - With Newsletters Can fetch members who are NOT subscribed 1: [body] 1`] = `
|
|
Object {
|
|
"members": Array [
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "with-product@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Dana Barrett",
|
|
"newsletters": Any<Array>,
|
|
"note": null,
|
|
"status": "paid",
|
|
"subscribed": false,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "vip-paid@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Peter Venkman",
|
|
"newsletters": Any<Array>,
|
|
"note": null,
|
|
"status": "paid",
|
|
"subscribed": false,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
],
|
|
"meta": Object {
|
|
"pagination": Object {
|
|
"limit": 15,
|
|
"next": null,
|
|
"page": 1,
|
|
"pages": 1,
|
|
"prev": null,
|
|
"total": 2,
|
|
},
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`Members API - With Newsletters Can fetch members who are NOT subscribed 2: [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": "2062",
|
|
"content-type": "application/json; charset=utf-8",
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
"vary": "Origin, Accept-Encoding",
|
|
"x-powered-by": "Express",
|
|
}
|
|
`;
|
|
|
|
exports[`Members API - With Newsletters Can fetch members who are subscribed 1: [body] 1`] = `
|
|
Object {
|
|
"members": Array [
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "vip@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Winston Zeddemore",
|
|
"newsletters": Any<Array>,
|
|
"note": null,
|
|
"status": "free",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "comped@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Vinz Clortho",
|
|
"newsletters": Any<Array>,
|
|
"note": null,
|
|
"status": "paid",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "trialing@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Ray Stantz",
|
|
"newsletters": Any<Array>,
|
|
"note": null,
|
|
"status": "paid",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "paid@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": 80,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Egon Spengler",
|
|
"newsletters": Any<Array>,
|
|
"note": null,
|
|
"status": "paid",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "member2@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": 50,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": null,
|
|
"newsletters": Any<Array>,
|
|
"note": null,
|
|
"status": "free",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
Object {
|
|
"avatar_image": null,
|
|
"comped": false,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"email": "member1@test.com",
|
|
"email_count": 0,
|
|
"email_open_rate": null,
|
|
"email_opened_count": 0,
|
|
"geolocation": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"labels": Any<Array>,
|
|
"last_seen_at": null,
|
|
"name": "Mr Egg",
|
|
"newsletters": Any<Array>,
|
|
"note": null,
|
|
"status": "free",
|
|
"subscribed": true,
|
|
"subscriptions": Any<Array>,
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
},
|
|
],
|
|
"meta": Object {
|
|
"pagination": Object {
|
|
"limit": 15,
|
|
"next": null,
|
|
"page": 1,
|
|
"pages": 1,
|
|
"prev": null,
|
|
"total": 6,
|
|
},
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`Members API - With Newsletters Can fetch members who are subscribed 2: [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": "11136",
|
|
"content-type": "application/json; charset=utf-8",
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
"vary": "Origin, Accept-Encoding",
|
|
"x-powered-by": "Express",
|
|
}
|
|
`;
|