Skip to content

Commit e85c1f7

Browse files
committed
refactor(MissionStepTest): [8단계] 테스트 코드 추가
1 parent d54dbec commit e85c1f7

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/test/java/roomescape/MissionStepTest.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,29 @@ public class MissionStepTest {
157157
assertThat(countAfterDelete).isEqualTo(0);
158158
}
159159

160+
@Test
161+
void 팔단계() {
162+
Map<String, String> params = new HashMap<>();
163+
params.put("time", "10:00");
164+
165+
RestAssured.given().log().all()
166+
.contentType(ContentType.JSON)
167+
.body(params)
168+
.when().post("/times")
169+
.then().log().all()
170+
.statusCode(201)
171+
.header("Location", "/times/1");
172+
173+
RestAssured.given().log().all()
174+
.when().get("/times")
175+
.then().log().all()
176+
.statusCode(200)
177+
.body("size()", is(1));
178+
179+
RestAssured.given().log().all()
180+
.when().delete("/times/1")
181+
.then().log().all()
182+
.statusCode(204);
183+
}
184+
160185
}

0 commit comments

Comments
 (0)