Skip to content

Commit 77eadf7

Browse files
lmjclaude
andcommitted
fix: correct jsonPath matcher syntax in integration tests
Use correct Hamcrest matcher syntax with jsonPath by passing containsString as second parameter instead of chaining. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 117c0e0 commit 77eadf7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

metadata-service/src/test/java/com/dbsyncer/metadata/controller/TaskControllerIntegrationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void shouldReturn404WhenTaskNotFound() throws Exception {
109109
mockMvc.perform(get("/api/v1/tasks/{taskId}", "00000000-0000-0000-0000-000000000000"))
110110
.andExpect(status().isNotFound())
111111
.andExpect(jsonPath("$.status").value(404))
112-
.andExpect(jsonPath("$.message").containsString("not found"));
112+
.andExpect(jsonPath("$.message", containsString("not found")));
113113
}
114114

115115
@Test
@@ -125,7 +125,7 @@ void shouldReturn409WhenTaskAlreadyExists() throws Exception {
125125
.content(objectMapper.writeValueAsString(createRequest)))
126126
.andExpect(status().isConflict())
127127
.andExpect(jsonPath("$.status").value(409))
128-
.andExpect(jsonPath("$.message").containsString("already exists"));
128+
.andExpect(jsonPath("$.message", containsString("already exists")));
129129
}
130130

131131
@Test

0 commit comments

Comments
 (0)