Skip to content

Commit

Permalink
test: change getTermById to inline-return
Browse files Browse the repository at this point in the history
Co-authored-by: kbsat <[email protected]>
  • Loading branch information
dongho108 and kbsat committed Aug 7, 2022
1 parent 7749769 commit 23864fd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/test/kotlin/apply/acceptance/fixture/TermFixture.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ class TermBuilder {
}

fun getTermById(termId: Long): TermResponse {
val term = RestAssured.given()
return RestAssured.given()
.get("/api/terms/$termId")
.then()
.extract()
.`as`(object : TypeRef<ApiResponse<TermResponse>>() {})
.body as TermResponse
return TermResponse(term.id, term.name)
}

fun term(builder: TermBuilder.() -> Unit): TermResponse {
Expand Down

0 comments on commit 23864fd

Please sign in to comment.