Bugfix: Last commit didnt fix profile upload. I fucked up. Hope this does :')
LocationBasedServices/sumoc-backend/pipeline/head This commit looks good
LocationBasedServices/sumoc-backend/pipeline/head This commit looks good
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user