mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 19:02:29 +03:00
98 lines
2.9 KiB
Plaintext
98 lines
2.9 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`Tiers API Can browse Tiers 1: [body] 1`] = `
|
|
Object {
|
|
"meta": Object {
|
|
"pagination": Object {
|
|
"limit": 15,
|
|
"next": null,
|
|
"page": 1,
|
|
"pages": 1,
|
|
"prev": null,
|
|
"total": 2,
|
|
},
|
|
},
|
|
"tiers": Array [
|
|
Object {
|
|
"active": true,
|
|
"benefits": null,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"description": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"name": "Free",
|
|
"slug": "free",
|
|
"stripe_prices": null,
|
|
"type": "free",
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"visibility": "public",
|
|
"welcome_page_url": "/welcome-free",
|
|
},
|
|
Object {
|
|
"active": true,
|
|
"benefits": null,
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"description": null,
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
"name": "Default Product",
|
|
"slug": "default-product",
|
|
"stripe_prices": null,
|
|
"type": "paid",
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
"visibility": "public",
|
|
"welcome_page_url": "/welcome-paid",
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`Tiers API Errors when price is negative 1: [body] 1`] = `
|
|
Object {
|
|
"errors": Array [
|
|
Object {
|
|
"code": null,
|
|
"context": "Tier prices must not be negative",
|
|
"details": 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": "Validation error, cannot save tier.",
|
|
"property": null,
|
|
"type": "ValidationError",
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`Tiers API Errors when price is non-integer 1: [body] 1`] = `
|
|
Object {
|
|
"errors": Array [
|
|
Object {
|
|
"code": null,
|
|
"context": "Tier prices must be an integer.",
|
|
"details": 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": "Validation error, cannot save tier.",
|
|
"property": null,
|
|
"type": "ValidationError",
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`Tiers API Errors when price is too large 1: [body] 1`] = `
|
|
Object {
|
|
"errors": Array [
|
|
Object {
|
|
"code": null,
|
|
"context": "Tier prices may not exceed 999999.99",
|
|
"details": 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": "Validation error, cannot save tier.",
|
|
"property": null,
|
|
"type": "ValidationError",
|
|
},
|
|
],
|
|
}
|
|
`;
|