docs(tests): clarify why fake base64 is acceptable in allowed-image-type test
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -589,6 +589,8 @@ class RecipeServiceTest {
|
|||||||
when(householdRepository.findById(HOUSEHOLD_ID)).thenReturn(Optional.of(household));
|
when(householdRepository.findById(HOUSEHOLD_ID)).thenReturn(Optional.of(household));
|
||||||
when(recipeRepository.save(any(Recipe.class))).thenAnswer(i -> i.getArgument(0));
|
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(
|
var request = new RecipeCreateRequest(
|
||||||
"Test", null, null, "easy", "data:image/jpeg;base64,abc",
|
"Test", null, null, "easy", "data:image/jpeg;base64,abc",
|
||||||
List.of(), List.of(), List.of());
|
List.of(), List.of(), List.of());
|
||||||
|
|||||||
Reference in New Issue
Block a user