mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Payment tests refactor (#9695)
* Reorganized files, reduced function size, reduced duplication * Refactored amazon tests organization * Reduced duplication * Reorganized paypal tests * Reorganized stripe tests * Fixed lint issues * Fixed gem purchase expectations * Added cloning so we don't modify the common block
This commit is contained in:
7
test/api/v3/unit/libs/payments/paymentHelpers.js
Normal file
7
test/api/v3/unit/libs/payments/paymentHelpers.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import { model as User } from '../../../../../../website/server/models/user';
|
||||
|
||||
export async function createNonLeaderGroupMember (group) {
|
||||
let nonLeader = new User();
|
||||
nonLeader.guilds.push(group._id);
|
||||
return await nonLeader.save();
|
||||
}
|
||||
Reference in New Issue
Block a user