From 23864fd0d04f0b4fd9967cf0df858b69444531cc Mon Sep 17 00:00:00 2001 From: dongho Date: Sun, 7 Aug 2022 19:16:34 +0900 Subject: [PATCH] test: change getTermById to inline-return Co-authored-by: kbsat --- src/test/kotlin/apply/acceptance/fixture/TermFixture.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/kotlin/apply/acceptance/fixture/TermFixture.kt b/src/test/kotlin/apply/acceptance/fixture/TermFixture.kt index 60eee950a..75b0df06f 100644 --- a/src/test/kotlin/apply/acceptance/fixture/TermFixture.kt +++ b/src/test/kotlin/apply/acceptance/fixture/TermFixture.kt @@ -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>() {}) .body as TermResponse - return TermResponse(term.id, term.name) } fun term(builder: TermBuilder.() -> Unit): TermResponse {