Skip to content

Commit

Permalink
HOTFIX Ignore order of messages in MessageControllerTest
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Arnhold <[email protected]>
  • Loading branch information
jnsrnhld committed Jul 11, 2023
1 parent 3f16e66 commit d7a2118
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.Set;

import static java.util.Collections.emptyList;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.hasSize;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
Expand Down Expand Up @@ -49,8 +49,7 @@ void getMessages_returnsMessages() throws Exception {
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$.messages", hasSize(2)))
.andExpect(jsonPath("$.messages[0].payload", equalTo("Nebuchadnezzar")))
.andExpect(jsonPath("$.messages[1].payload", equalTo("Serenity")));
.andExpect(jsonPath("$.messages[*].payload", containsInAnyOrder("Nebuchadnezzar", "Serenity")));
}

@Test
Expand Down

0 comments on commit d7a2118

Please sign in to comment.