From b2a798d90e9abbaa5e54fff33d73cb63a177e8d2 Mon Sep 17 00:00:00 2001 From: Marcel Raddatz Date: Fri, 10 Apr 2026 09:38:29 +0200 Subject: [PATCH] docs(tests): clarify why fake base64 is acceptable in allowed-image-type test Co-Authored-By: Claude Sonnet 4.6 --- .../src/test/java/com/recipeapp/recipe/RecipeServiceTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/test/java/com/recipeapp/recipe/RecipeServiceTest.java b/backend/src/test/java/com/recipeapp/recipe/RecipeServiceTest.java index 4e60b79..1217728 100644 --- a/backend/src/test/java/com/recipeapp/recipe/RecipeServiceTest.java +++ b/backend/src/test/java/com/recipeapp/recipe/RecipeServiceTest.java @@ -589,6 +589,8 @@ class RecipeServiceTest { when(householdRepository.findById(HOUSEHOLD_ID)).thenReturn(Optional.of(household)); when(recipeRepository.save(any(Recipe.class))).thenAnswer(i -> i.getArgument(0)); + // "abc" is not valid base64 for a real image; ImageCompressor will return null for the + // preview, but validateHeroImageUrl() should pass for a well-formed data URI prefix. var request = new RecipeCreateRequest( "Test", null, null, "easy", "data:image/jpeg;base64,abc", List.of(), List.of(), List.of());