From d670dd69c5c52b4cef2ac21f7020b07ba87df2a2 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 10 Apr 2024 04:32:46 -0500 Subject: [PATCH] Added user testing --- backend/services/roommate.services.js | 1 + backend/services/user.services.js | 23 ++++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/backend/services/roommate.services.js b/backend/services/roommate.services.js index e4c6d05..5cdb9e1 100644 --- a/backend/services/roommate.services.js +++ b/backend/services/roommate.services.js @@ -38,4 +38,5 @@ exports.getAllRoommateFormsService = async (params, body) => { *********************************/ setTimeout(function() { // third set of tests to run (user, org, roommate) console.log("I am roommate testing, I am running"); + }, 15000); diff --git a/backend/services/user.services.js b/backend/services/user.services.js index 446ef82..f07dd0a 100644 --- a/backend/services/user.services.js +++ b/backend/services/user.services.js @@ -146,6 +146,27 @@ exports.deleteUserByIdService = async(params, body) => { /********************************* ************ TESTING ************ *********************************/ - setTimeout(function() { // first set of tests to run (user, org, roommate) +setTimeout(function() { // first set of tests to run (user, org, roommate) console.log("I am user testing, I am running"); + let body1 = { + 'name': "Martin", + 'email': "martin@geico.com", + 'phoneNumber': "911" + } + let params1 = { + 'userId': 102930 + } + let body2 = { + 'name': "NotaName", + 'email': "not@notemail.com", + 'phoneNumber': "0" + } + let params2 = { + 'userId': 10000000 + } + let user = addUserService(body1, params1); console.log("Add User: ", user); + //let user_no = addUserService(body1, params1); console.log("Do not add existing user: ", user_no); + //let findUser = getUserByIdService(body1, params1); console.log("Find added user", findUser); + //let updateUser = updateUserByIdService(body2, params1); console.log("Update user: ", updateUser); + //let deleteUser = deleteUserByIdService(body2, params1); console.log("Delete user: ", deleteUser); }, 5000); \ No newline at end of file