Skip to content

Commit

Permalink
test: API 엔드포인트 변경에 따른 테스트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
seokmyungham committed Jul 30, 2024
1 parent 746d6d0 commit 202b514
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void login() {
RestAssured.given().log().all()
.contentType(ContentType.JSON)
.body(request)
.when().post("/api/v1/login/{uuid}", meeting.getUuid())
.when().post("/api/v1/meetings/{uuid}/login", meeting.getUuid())
.then().log().all()
.statusCode(HttpStatus.OK.value());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void find() {

Response response = RestAssured.given().log().all()
.contentType(ContentType.JSON)
.when().get("/api/v1/meeting/{uuid}", meeting.getUuid());
.when().get("/api/v1/meetings/{uuid}", meeting.getUuid());

String meetingName = response.jsonPath().getString("data.meetingName");
String firstTime = response.jsonPath().getString("data.firstTime");
Expand All @@ -87,7 +87,7 @@ void findMeetingSharing() {

RestAssured.given().log().all()
.contentType(ContentType.JSON)
.when().get("/api/v1/meeting/{uuid}/sharing", meeting.getUuid())
.when().get("/api/v1/meetings/{uuid}/sharing", meeting.getUuid())
.then().log().all()
.statusCode(HttpStatus.OK.value());
}
Expand All @@ -97,7 +97,7 @@ void findMeetingSharing() {
void findMeetingSharingFailedWithInvalidUUID() {
RestAssured.given().log().all()
.contentType(ContentType.JSON)
.when().get("/api/v1/meeting/{uuid}/sharing", "1234")
.when().get("/api/v1/meetings/{uuid}/sharing", "1234")
.then().log().all()
.statusCode(HttpStatus.BAD_REQUEST.value());
}
Expand All @@ -116,7 +116,7 @@ void create() {
RestAssured.given().log().all()
.contentType(ContentType.JSON)
.body(request)
.when().post("/api/v1/meeting")
.when().post("/api/v1/meetings")
.then().log().all()
.assertThat()
.statusCode(HttpStatus.CREATED.value())
Expand All @@ -138,7 +138,7 @@ void createByDuplicatedName() {
RestAssured.given().log().all()
.contentType(ContentType.JSON)
.body(request)
.when().post("/api/v1/meeting")
.when().post("/api/v1/meetings")
.then().log().all()
.assertThat()
.statusCode(HttpStatus.BAD_REQUEST.value());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void create() {
String token = RestAssured.given().log().all()
.contentType(ContentType.JSON)
.body(loginRequest)
.when().post("/api/v1/login/{uuid}", meeting.getUuid())
.when().post("/api/v1/meetings/{uuid}/login", meeting.getUuid())
.then().log().all()
.statusCode(HttpStatus.OK.value())
.extract().jsonPath().getString("data.token");
Expand All @@ -89,7 +89,7 @@ void create() {
.pathParam("uuid", meeting.getUuid())
.contentType(ContentType.JSON)
.body(scheduleCreateRequest)
.when().post("/api/v1/schedule/{uuid}")
.when().post("/api/v1/meetings/{uuid}/schedules")
.then().log().all()
.statusCode(HttpStatus.OK.value());
}
Expand All @@ -102,7 +102,7 @@ void findSchedulesOfAttendee() {
RestAssured.given().log().all()
.pathParam("uuid", meeting.getUuid())
.queryParam("attendeeName", attendee.name())
.when().get("/api/v1/meeting/{uuid}/schedules")
.when().get("/api/v1/meetings/{uuid}/schedules")
.then().log().all()
.statusCode(HttpStatus.OK.value());
}
Expand All @@ -112,7 +112,7 @@ void findSchedulesOfAttendee() {
void findAllSchedules() {
RestAssured.given().log().all()
.contentType(ContentType.JSON)
.when().get("/api/v1/meeting/{uuid}/schedules", meeting.getUuid())
.when().get("/api/v1/meetings/{uuid}/schedules", meeting.getUuid())
.then().log().all()
.statusCode(HttpStatus.OK.value());
}
Expand All @@ -127,7 +127,7 @@ void findMySchedule() {
String token = RestAssured.given().log().all()
.contentType(ContentType.JSON)
.body(loginRequest)
.when().post("/api/v1/login/{uuid}", meeting.getUuid())
.when().post("/api/v1/meetings/{uuid}/login", meeting.getUuid())
.then().log().all()
.statusCode(HttpStatus.OK.value())
.extract().jsonPath().getString("data.token");
Expand All @@ -136,7 +136,7 @@ void findMySchedule() {
.header("Authorization", "Bearer " + token)
.pathParam("uuid", meeting.getUuid())
.contentType(ContentType.JSON)
.when().get("/api/v1/meeting/{uuid}/my-schedule")
.when().get("/api/v1/meetings/{uuid}/attendees/me/schedules")
.then().log().all()
.statusCode(HttpStatus.OK.value());
}
Expand Down

0 comments on commit 202b514

Please sign in to comment.