Ghost/core/test/unit/helpers
Naz Gargol e277c6bad3
Added member's subscription cancellation helper {{cancel_link}} (#11434)
no issue

- The helper allows generating HTML needed to cancel or continue the member's subscription depending on subscription state.
- Added public members endpoint to allow updating subscription's `cancel_at_period_end` attribute available at: `PUT /api/canary/members/subscriptions/:id/`
- Added client-side hook to allow calling subscription cancellation. Allows to create elements with `data-members-cancel-subscription` / `data-members-continue-subscription` attributes which would call subscription update.
- Updated schema and added migration for `current_period_end` column
- As discussed we only add a single column to  subscriptions table to avoid preoptimizing for future cases
- Added {{cancel_link}} helper
- Added error handling for {{cancel_link}} when members are disabled
- Added test coverage for {{cancel_link}} helper
- Bumped @tryghost/members-api version to 0.10.2. Needed to use `updateSubscription` middleware
- Bumped gscan to 3.2.0. Needed to recognize new {{cancel_link}} helper
2019-12-12 19:59:15 +07:00
..
test_tpl Added support for secondary navigation (#11409) 2019-12-04 11:12:02 +07:00
asset_spec.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
author_spec.js Updated tests eslint config to use eslint-plugin-ghost@0.5.0 2019-08-19 13:38:35 +01:00
authors_spec.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
body_class_spec.js 🔥 Removed V1 code/references in frontend helpers/meta layers (#11080) 2019-09-10 11:37:04 +02:00
cancel_link_spec.js Added member's subscription cancellation helper {{cancel_link}} (#11434) 2019-12-12 19:59:15 +07:00
concat_spec.js Updated tests eslint config to use eslint-plugin-ghost@0.5.0 2019-08-19 13:38:35 +01:00
content_spec.js Updated tests eslint config to use eslint-plugin-ghost@0.5.0 2019-08-19 13:38:35 +01:00
date_spec.js 🔥 Removed V1 code/references in frontend helpers/meta layers (#11080) 2019-09-10 11:37:04 +02:00
encode_spec.js Updated tests eslint config to use eslint-plugin-ghost@0.5.0 2019-08-19 13:38:35 +01:00
excerpt_spec.js Added fallback to excerpt in {{excerpt}} helper for gated content (#11430) 2019-12-03 11:32:46 +07:00
facebook_url_spec.js 🔥 Removed V1 code/references in frontend helpers/meta layers (#11080) 2019-09-10 11:37:04 +02:00
foreach_spec.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
get_spec.js Added member's subscription cancellation helper {{cancel_link}} (#11434) 2019-12-12 19:59:15 +07:00
ghost_foot_spec.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
ghost_head_spec.js Updated meta/structured data sources & fallbacks (#11068) 2019-11-21 13:08:00 +00:00
has_spec.js 🔥 Removed V1 code/references in frontend helpers/meta layers (#11080) 2019-09-10 11:37:04 +02:00
img_url_spec.js Updated @tryghost/url-utils to v0.2.0 (#11004) 2019-08-12 09:31:42 +01:00
index_spec.js Added member's subscription cancellation helper {{cancel_link}} (#11434) 2019-12-12 19:59:15 +07:00
is_spec.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
lang_spec.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
link_class_spec.js Added {{link_class}} helper 2019-08-05 12:12:05 +01:00
link_spec.js Updated tests eslint config to use eslint-plugin-ghost@0.5.0 2019-08-19 13:38:35 +01:00
meta_description_spec.js Updated meta/structured data sources & fallbacks (#11068) 2019-11-21 13:08:00 +00:00
meta_title_spec.js Updated meta/structured data sources & fallbacks (#11068) 2019-11-21 13:08:00 +00:00
navigation_spec.js Added support for secondary navigation (#11409) 2019-12-04 11:12:02 +07:00
next_post_spec.js 🔥 Removed v0.1 controllers & routes (#11103) 2019-09-11 19:10:10 +02:00
page_url_spec.js Updated tests eslint config to use eslint-plugin-ghost@0.5.0 2019-08-19 13:38:35 +01:00
pagination_spec.js 🔥 Removed V1 code/references in frontend helpers/meta layers (#11080) 2019-09-10 11:37:04 +02:00
plural_spec.js Updated tests eslint config to use eslint-plugin-ghost@0.5.0 2019-08-19 13:38:35 +01:00
post_class_spec.js Fix silly issues with post class 2019-11-06 11:02:50 +07:00
prev_post_spec.js 🔥 Removed v0.1 controllers & routes (#11103) 2019-09-11 19:10:10 +02:00
reading_time_spec.js Updated tests eslint config to use eslint-plugin-ghost@0.5.0 2019-08-19 13:38:35 +01:00
t_spec.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
tags_spec.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
template_spec.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
title_spec.js Updated tests eslint config to use eslint-plugin-ghost@0.5.0 2019-08-19 13:38:35 +01:00
twitter_url_spec.js 🔥 Removed V1 code/references in frontend helpers/meta layers (#11080) 2019-09-10 11:37:04 +02:00
url_spec.js Updated @tryghost/url-utils to v0.2.0 (#11004) 2019-08-12 09:31:42 +01:00
utils_spec.js Updated to use count words/images helpers from SDK (#10686) 2019-04-16 08:00:01 +05:30