File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ describe("Event UpdatedAt Resolver Tests", () => {
50
50
) ;
51
51
} ) ;
52
52
53
- it ( "should throw unauthenticated error is userId exists but current user doesn't exists" , async ( ) => {
53
+ it ( "should throw unauthenticated error if userId exists but current user doesn't exists" , async ( ) => {
54
54
const currentUser = undefined ;
55
55
mocks . drizzleClient . query . usersTable . findFirst . mockResolvedValue (
56
56
currentUser ,
@@ -202,21 +202,20 @@ describe("Event UpdatedAt Resolver Tests", () => {
202
202
203
203
it ( "should handle invalid organizationId" , async ( ) => {
204
204
mockEvent . organizationId = null as unknown as string ;
205
-
205
+
206
206
mocks . drizzleClient . query . usersTable . findFirst . mockImplementation ( ( ) => {
207
207
throw new TalawaGraphQLError ( {
208
208
message : "Unauthorized action" , // Include a message for clarity
209
209
extensions : { code : "unauthorized_action" } ,
210
210
} ) ;
211
211
} ) ;
212
-
212
+
213
213
await expect ( eventUpdatedAtResolver ( mockEvent , { } , ctx ) ) . rejects . toThrow (
214
214
expect . objectContaining ( {
215
215
message : "Unauthorized action" , // Ensure the message is checked
216
216
extensions : { code : "unauthorized_action" } ,
217
- } )
217
+ } ) ,
218
218
) ;
219
219
} ) ;
220
-
221
220
} ) ;
222
221
} ) ;
You can’t perform that action at this time.
0 commit comments