aboutsummaryrefslogtreecommitdiff
path: root/ufund-api/src/test/java/com/ufund/api/ufundapi/controller/UserControllerTest.java
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2025-03-26 18:14:47 -0400
committersowgro <tpoke.ferrari@gmail.com>2025-03-26 18:14:47 -0400
commitab35efb06b926e8a3aee5cfc8d1fa908aa4a4707 (patch)
tree6f456fe322a32510c611cd787d653ed186b0777d /ufund-api/src/test/java/com/ufund/api/ufundapi/controller/UserControllerTest.java
parentea13cf6ab3b71ff5e83fca876ec71fec1f7b00ae (diff)
downloadJellySolutions-ab35efb06b926e8a3aee5cfc8d1fa908aa4a4707.tar.gz
JellySolutions-ab35efb06b926e8a3aee5cfc8d1fa908aa4a4707.tar.bz2
JellySolutions-ab35efb06b926e8a3aee5cfc8d1fa908aa4a4707.zip
Fix cupboard access checking and logging
Diffstat (limited to 'ufund-api/src/test/java/com/ufund/api/ufundapi/controller/UserControllerTest.java')
-rw-r--r--ufund-api/src/test/java/com/ufund/api/ufundapi/controller/UserControllerTest.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/ufund-api/src/test/java/com/ufund/api/ufundapi/controller/UserControllerTest.java b/ufund-api/src/test/java/com/ufund/api/ufundapi/controller/UserControllerTest.java
index cc7df40..06fb6cd 100644
--- a/ufund-api/src/test/java/com/ufund/api/ufundapi/controller/UserControllerTest.java
+++ b/ufund-api/src/test/java/com/ufund/api/ufundapi/controller/UserControllerTest.java
@@ -82,7 +82,7 @@ public class UserControllerTest {
String key = UserAuth.generate(username).getKey();
// When getUser is called on the Mock User service, throw an IOException
// doThrow(new IllegalAccessException()).when(mockUserService).getUser(username);
- doThrow(new IllegalAccessException()).when(mockAuthService).authenticate(username, key);
+ doThrow(new IllegalAccessException()).when(mockAuthService).keyHasAccessToUser(username, key);
// Invoke
ResponseEntity<User> response = userController.getUser(username, key);
@@ -237,7 +237,7 @@ public class UserControllerTest {
String key = UserAuth.generate(username).getKey();
// When updateUser is called on the Mock User service, throw a Invalid Parameter exception
// exception
- doThrow(new IllegalAccessException()).when(mockAuthService).authenticate(username, key);
+ doThrow(new IllegalAccessException()).when(mockAuthService).keyHasAccessToUser(username, key);
// Invoke
@@ -298,7 +298,7 @@ public class UserControllerTest {
String username = "Test";
String key = UserAuth.generate(username).getKey();
// When deleteUser is called on the Mock User service, throw an IOException
- doThrow(new IllegalAccessException()).when(mockAuthService).authenticate(username, key);
+ doThrow(new IllegalAccessException()).when(mockAuthService).keyHasAccessToUser(username, key);
// Invoke
ResponseEntity<Boolean> response = userController.deleteUser(username, key);