mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Allow group plans for private guilds only (#12479)
* hide upgrade button for public guilds * prevent group plans for public guilds * fix unit tests * fix integration and unit tests that assumed group plans could be public guilds * more unit tests fixes * more resilient unit test * more resilient unit test
This commit is contained in:
@@ -274,6 +274,7 @@ describe('POST /groups/:groupId/leave', () => {
|
||||
|
||||
each(typesOfGroups, (groupDetails, groupType) => {
|
||||
context(`Leaving a group plan when the group is a ${groupType}`, () => {
|
||||
if (groupDetails.privacy === 'public') return; // public guilds cannot be group plans
|
||||
let groupWithPlan;
|
||||
let leader;
|
||||
let member;
|
||||
@@ -341,6 +342,7 @@ describe('POST /groups/:groupId/leave', () => {
|
||||
|
||||
each(typesOfGroups, (groupDetails, groupType) => {
|
||||
context(`Leaving a group with extraMonths left plan when the group is a ${groupType}`, () => {
|
||||
if (groupDetails.privacy === 'public') return; // public guilds cannot be group plans
|
||||
const extraMonths = 12;
|
||||
let groupWithPlan;
|
||||
let member;
|
||||
|
||||
Reference in New Issue
Block a user