-
Notifications
You must be signed in to change notification settings - Fork 237
refactor: MVC Response 학습테스트 실패환경 구성 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
26c56ec
d180f4b
7bb5ce9
980d853
f04d2b6
1423775
0fbb44b
6256da4
8c11091
72ab5f9
caa6bf4
7e6a834
11d1749
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| package cholog; | ||
|
|
||
| import org.springframework.stereotype.Controller; | ||
| import org.springframework.ui.Model; | ||
|
|
||
| @Controller | ||
| public class MemberController { | ||
|
|
||
| public Model world() { | ||
| // TODO: /hello 요청 시 resources/templates/hello.html 페이지가 응답할 수 있도록 설정한다. | ||
| return null; | ||
| } | ||
|
||
|
|
||
| public Person json() { | ||
| // TODO: /json 요청 시 {"name": "brown", "age": 20} 응답할 수 있도록 설정한다. | ||
| return null; | ||
| } | ||
|
||
| } | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |
| import static org.assertj.core.api.Assertions.assertThat; | ||
|
|
||
| @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) | ||
| public class ResponseTemplatesTest { | ||
| class ResponseTemplatesTest { | ||
|
|
||
| @Test | ||
| void responseTemplatesPage() { | ||
|
|
@@ -20,4 +20,14 @@ void responseTemplatesPage() { | |
| assertThat(response.statusCode()).isEqualTo(HttpStatus.OK.value()); | ||
| assertThat(response.asString()).contains("Hello, Brie!"); | ||
| } | ||
|
|
||
| @Test | ||
| void responseTemplatesHelloPage() { | ||
| var response = RestAssured | ||
| .given().log().all() | ||
| .when().get("/hello") | ||
| .then().log().all().extract(); | ||
|
|
||
| assertThat(response.statusCode()).isEqualTo(HttpStatus.OK.value()); | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 새로운 학습 테스트 👍 |
||
| } | ||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
혹시 컨트롤러 이름이 변경된 이유가 있을까요?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README 및 LMS 상에서 제시되고있는 컨트롤러 명이 MemberController여서 변경했습니다!