v1.2.9.4 fix on generated diet JSON handling

This commit is contained in:
bossanyit 2023-06-15 17:14:19 +02:00
parent 7ea9164f66
commit acc914f170
2 changed files with 7 additions and 7 deletions

View File

@ -176,7 +176,7 @@ class DietTest {
println("DietID: ${diet.dietId}")
}
@Test
//@Test
fun `generate premium diet successfully`() {
val input = "Készíts egy személyre szabott heti étrendet ezekkel a paraméterekkel:\n" +
@ -201,7 +201,7 @@ class DietTest {
"]}"
mockMvc.perform(
MockMvcRequestBuilders.post("/api/diet/generate_premium/2/false")
MockMvcRequestBuilders.post("/api/diet/generate_premium/2/true")
.contentType(MediaType.APPLICATION_JSON)
.header("Authorization", "Bearer $authToken")
.content(input)

View File

@ -138,11 +138,11 @@ class MealTest {
.header("Authorization", "Bearer $authToken")
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk)
.andExpect(jsonPath("$.[73].name").value("Tükörtojás"))
.andExpect(jsonPath("$.[73].normalizedName").value("Tukortojas"))
.andExpect(jsonPath("$.[74].name").value("Tigris buci"))
.andExpect(jsonPath("$.[75].quantity").value(330.0))
.andExpect(jsonPath("$.[75].name").value("Töltötttojás"))
.andExpect(jsonPath("$.[111].name").value("Tükörtojás"))
.andExpect(jsonPath("$.[111].normalizedName").value("Tukortojas"))
.andExpect(jsonPath("$.[112].name").value("Tigris buci"))
.andExpect(jsonPath("$.[113].quantity").value(330.0))
.andExpect(jsonPath("$.[113].name").value("Töltötttojás"))
// Act & Assert