Updated membercount checks (#10006)

* Updated membercount checks

* Added get member count method

* Updated tests to correctly add users
This commit is contained in:
Keith Holliday
2018-02-26 13:03:04 -07:00
committed by GitHub
parent 6118336a5d
commit 7dcd550209
5 changed files with 39 additions and 9 deletions

View File

@@ -227,6 +227,11 @@ describe('checkout with subscription', () => {
sub = data.sub;
groupId = group._id;
email = 'test@test.com';
// Add user to group
user.guilds.push(groupId);
await user.save();
headers = {};
await stripePayments.checkout({
@@ -267,9 +272,15 @@ describe('checkout with subscription', () => {
groupId = group._id;
email = 'test@test.com';
headers = {};
// Add user to group
user.guilds.push(groupId);
await user.save();
user = new User();
user.guilds.push(groupId);
await user.save();
group.memberCount = 2;
await group.save();