Skip to content

Commit b36012a

Browse files
committed
Add shouldDeleteWithValidID🫸🌀✏️📗🐧🐳⬆
1 parent 8ade88f commit b36012a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/test/java/id/my/hendisantika/testcontainerpostgresql/SpringBootTestContainerPostgresqlApplicationTests.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,11 @@ void shouldUpdatePostWhenPostIsValid() {
9494
assertThat(updated.title()).isEqualTo("NEW POST TITLE #1");
9595
assertThat(updated.body()).isEqualTo("NEW POST BODY #1");
9696
}
97+
98+
@Test
99+
@Rollback
100+
void shouldDeleteWithValidID() {
101+
ResponseEntity<Void> response = restTemplate.exchange("/api/posts/88", HttpMethod.DELETE, null, Void.class);
102+
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NO_CONTENT);
103+
}
97104
}

0 commit comments

Comments
 (0)