From 06b9061433208a8967cc7fff5d57b6f715bf3bf7 Mon Sep 17 00:00:00 2001 From: Carsten Otto Date: Thu, 12 May 2022 22:46:20 +0200 Subject: [PATCH] use text block in test --- .../controller/ObjectMapperConfigurationIT.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/src/integrationTest/java/de/cotto/lndmanagej/controller/ObjectMapperConfigurationIT.java b/web/src/integrationTest/java/de/cotto/lndmanagej/controller/ObjectMapperConfigurationIT.java index 70b1d371..4c650931 100644 --- a/web/src/integrationTest/java/de/cotto/lndmanagej/controller/ObjectMapperConfigurationIT.java +++ b/web/src/integrationTest/java/de/cotto/lndmanagej/controller/ObjectMapperConfigurationIT.java @@ -40,7 +40,11 @@ class ObjectMapperConfigurationIT { @Test void output_is_pretty_printed() throws Exception { when(channelService.getOpenChannels()).thenReturn(Set.of(LOCAL_OPEN_CHANNEL)); + String expectedString = """ + { + "channels" : [ "712345x123x1" ] + }"""; mockMvc.perform(get(PREFIX + "/open-channels/")) - .andExpect(content().string("{\n \"channels\" : [ \"712345x123x1\" ]\n}")); + .andExpect(content().string(expectedString)); } -} \ No newline at end of file +}