mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
🐛 Fixed incorrect status used for trial subscription query
refs 96c18edc82
- replaced `trialed` with `trialing` to correctly match the status used in Stripe
This commit is contained in:
parent
7309cc1ddb
commit
936d7a315a
@ -211,7 +211,7 @@ const Member = ghostBookshelf.Model.extend({
|
||||
'members_stripe_customers_subscriptions.customer_id'
|
||||
).onIn(
|
||||
'members_stripe_customers_subscriptions.status',
|
||||
['active', 'trialed']
|
||||
['active', 'trialing']
|
||||
);
|
||||
}
|
||||
);
|
||||
|
@ -110,7 +110,7 @@ describe('Members API', function () {
|
||||
should.exist(jsonResponse.members);
|
||||
jsonResponse.members.should.have.length(2);
|
||||
jsonResponse.members[0].email.should.equal('paid@test.com');
|
||||
jsonResponse.members[1].email.should.equal('trialed@test.com');
|
||||
jsonResponse.members[1].email.should.equal('trialing@test.com');
|
||||
localUtils.API.checkResponse(jsonResponse, 'members');
|
||||
localUtils.API.checkResponse(jsonResponse.members[0], 'member', 'stripe');
|
||||
localUtils.API.checkResponse(jsonResponse.meta.pagination, 'pagination');
|
||||
|
@ -218,7 +218,7 @@ describe('Member Model', function run() {
|
||||
}).then(function (queryResult) {
|
||||
queryResult.length.should.equal(2);
|
||||
queryResult.models[0].get('email').should.equal('paid@test.com');
|
||||
queryResult.models[1].get('email').should.equal('trialed@test.com');
|
||||
queryResult.models[1].get('email').should.equal('trialing@test.com');
|
||||
|
||||
done();
|
||||
}).catch(done);
|
||||
|
@ -324,7 +324,7 @@ DataGenerator.Content = {
|
||||
},
|
||||
{
|
||||
id: ObjectId.generate(),
|
||||
email: 'trialed@test.com',
|
||||
email: 'trialing@test.com',
|
||||
name: 'Ray Stantz'
|
||||
}
|
||||
],
|
||||
@ -355,7 +355,7 @@ DataGenerator.Content = {
|
||||
member_id: null, // relation added later
|
||||
customer_id: 'cus_HR3tBmNhx4QsZZ',
|
||||
name: 'Ray Stantz',
|
||||
email: 'trialed@test.com'
|
||||
email: 'trialing@test.com'
|
||||
}
|
||||
],
|
||||
|
||||
@ -380,7 +380,7 @@ DataGenerator.Content = {
|
||||
customer_id: 'cus_HR3tBmNhx4QsZZ',
|
||||
subscription_id: 'sub_HR3tLNgGAHsa7c',
|
||||
plan_id: '173e16a1fffa7d232b398e4a9b08d266a456ae8f3d23e5f11cc608ced6730bb9',
|
||||
status: 'trialed',
|
||||
status: 'trialing',
|
||||
cancel_at_period_end: true,
|
||||
current_period_end: '2025-07-09 19:01:20',
|
||||
start_date: '2020-06-09 19:01:20',
|
||||
|
Loading…
Reference in New Issue
Block a user