Bugfix: Last commit didnt fix profile upload. I fucked up. Hope this does :')
LocationBasedServices/sumoc-backend/pipeline/head This commit looks good

This commit is contained in:
2026-02-08 03:59:13 +01:00
parent f88f5a03ef
commit cc6990a2a1
5 changed files with 105 additions and 31 deletions
@@ -196,7 +196,7 @@ public class UserServiceTest {
userService.setProfilePicture(sender.getId(), base64Image);
// Get profile picture
String profilePicture = userService.getProfilePicture(sender.getId());
String profilePicture = userService.getProfilePicture(sender.getId()).getBase64ProfilePicture();
assertNotNull(profilePicture);
assertEquals(base64Image.getBytes().length, profilePicture.length());
assertEquals(base64Image, profilePicture);
@@ -214,7 +214,7 @@ public class UserServiceTest {
userRepository.save(anotherUser);
byte[] secondImage = new byte[]{10,20,30,40,50};
anotherUser.getProfileImage().setImageData(secondImage);
byte[] profilePicture2 = ImageBase64Util.decode(userService.getProfilePicture(anotherUser.getId()));
byte[] profilePicture2 = ImageBase64Util.decode(userService.getProfilePicture(anotherUser.getId()).getBase64ProfilePicture());
assertNotNull(profilePicture2);
assertEquals(secondImage.length, profilePicture2.length);
assertArrayEquals(secondImage, profilePicture2);