From fd3728eb4d02538e9a0bb0da48fca5f8c81d6763 Mon Sep 17 00:00:00 2001 From: Jesse Brault Date: Sun, 8 Feb 2026 13:01:43 -0600 Subject: [PATCH] MME-19 Add test for images?count=true endpoint. --- .../mealsmadeeasy/api/image/ImageControllerTests.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/integrationTest/java/app/mealsmadeeasy/api/image/ImageControllerTests.java b/src/integrationTest/java/app/mealsmadeeasy/api/image/ImageControllerTests.java index f6e34b1..9f962f3 100644 --- a/src/integrationTest/java/app/mealsmadeeasy/api/image/ImageControllerTests.java +++ b/src/integrationTest/java/app/mealsmadeeasy/api/image/ImageControllerTests.java @@ -440,4 +440,15 @@ public class ImageControllerTests { .andExpect(status().isForbidden()); } + @Test + public void getCountOfOwnedImages() throws Exception { + final User owner = this.seedUser(); + this.mockMvc.perform( + get("/images?count=true") + .header("Authorization", "Bearer " + this.getAccessToken(owner)) + ) + .andExpect(status().isOk()) + .andExpect(jsonPath("$.count").isNotEmpty()); + } + }