@@ -6,11 +6,7 @@ import { OrganizationType } from "@prisma/client";
6
6
import * as appHandler from "./route" ;
7
7
8
8
describe ( "POST /api/partnerDetails/[userId]" , ( ) => {
9
- beforeEach ( ( ) => {
10
-
11
- } ) ;
12
-
13
- //No Valid Session (401)
9
+ // No Valid Session (401)
14
10
test ( "returns 401 when there is no valid session" , async ( ) => {
15
11
authMock . mockReturnValueOnce ( null ) ; //no valid session
16
12
@@ -34,7 +30,7 @@ describe("POST /api/partnerDetails/[userId]", () => {
34
30
} ) ;
35
31
} ) ;
36
32
37
- //PARTNER user tries to modify another user's details (session user ID does not match the request user ID) (403)
33
+ // PARTNER user tries to modify another user's details (session user ID does not match the request user ID) (403)
38
34
test ( "returns 403 when a PARTNER user tries to modify another user's record" , async ( ) => {
39
35
authMock . mockReturnValueOnce ( {
40
36
user : { id : "1" , type : "PARTNER" } ,
@@ -61,7 +57,7 @@ describe("POST /api/partnerDetails/[userId]", () => {
61
57
} ) ;
62
58
} ) ;
63
59
64
- //Invalid Form Data (400)
60
+ // Invalid Form Data (400)
65
61
test ( "returns 400 when the form data is invalid" , async ( ) => {
66
62
authMock . mockReturnValueOnce ( {
67
63
user : { id : "1" , type : "SUPER_ADMIN" } ,
@@ -88,7 +84,7 @@ describe("POST /api/partnerDetails/[userId]", () => {
88
84
} ) ;
89
85
} ) ;
90
86
91
- //Valid Request (200)
87
+ // Valid Request (200)
92
88
test ( "updates PartnerDetails and returns 200 for a valid request" , async ( ) => {
93
89
authMock . mockReturnValueOnce ( {
94
90
user : { id : "1" , type : "SUPER_ADMIN" } ,
0 commit comments