Skip to content

Commit 114ee64

Browse files
committed
[#54] feat: Follow, 특정_사람의_프로필을_조회한다
1 parent 9290ee4 commit 114ee64

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

src/main/java/com/study/realworld/domain/follow/dto/UnFollowResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class UnFollowResponse {
3030
private Boolean followable;
3131

3232
public static UnFollowResponse from(final User user) {
33-
return of(user, true);
33+
return of(user, false);
3434
}
3535

3636
private static UnFollowResponse of(final User user, final boolean followable) {

src/test/java/com/study/realworld/acceptance/FollowAcceptanceTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ public void setUp() {
3737
@Test
3838
void 특정_사람의_프로필을_조회한다() {
3939
final Login.Response loginResponse = 로그인_되어있음(user1.userEmail().value());
40-
final ExtractableResponse<Response> response = 프로필_조회_요청(loginResponse.accessToken(), user2.userName().value());
40+
final ExtractableResponse<Response> response = 프로필_조회_요청(
41+
loginResponse.accessToken(),
42+
user2.userName().value());
4143
final ProfileResponse profileResponse = response.as(ProfileResponse.class);
4244

4345
assertAll(

src/test/java/com/study/realworld/acceptance/UserAcceptanceTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.study.realworld.domain.auth.dto.Login;
44
import com.study.realworld.domain.user.domain.vo.UserEmail;
5+
import com.study.realworld.domain.user.domain.vo.UserName;
56
import com.study.realworld.domain.user.dto.UserInfo;
67
import com.study.realworld.domain.user.dto.UserJoin;
78
import com.study.realworld.domain.user.dto.UserUpdate;
@@ -60,7 +61,7 @@ class UserAcceptanceTest extends AcceptanceTest {
6061
() -> assertThat(response.statusCode()).isEqualTo(HttpStatus.OK.value()),
6162
() -> assertThat(userInfo.userEmail().value()).isEqualTo(userEmail),
6263
() -> assertThat(userInfo.accessToken()).isNotNull(),
63-
() -> assertThat(userInfo.userName()).isEqualTo(USER_NAME),
64+
() -> assertThat(userInfo.userName()).isEqualTo(UserName.from(userEmail.split("@")[0])),
6465
() -> assertThat(userInfo.userBio()).isNull(),
6566
() -> assertThat(userInfo.userImage()).isNull()
6667
);

src/test/java/com/study/realworld/domain/follow/dto/ProfileResponseTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ProfileResponseTest {
2121

2222
assertAll(
2323
() -> assertThat(profileResponse).isNotNull(),
24-
() -> assertThat(profileResponse).isExactlyInstanceOf(FollowResponse.class)
24+
() -> assertThat(profileResponse).isExactlyInstanceOf(ProfileResponse.class)
2525
);
2626
}
2727

src/test/java/com/study/realworld/domain/follow/dto/UnFollowResponseTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class UnFollowResponseTest {
1919

2020
assertAll(
2121
() -> assertThat(unFollowResponse).isNotNull(),
22-
() -> assertThat(unFollowResponse).isExactlyInstanceOf(FollowResponse.class)
22+
() -> assertThat(unFollowResponse).isExactlyInstanceOf(UnFollowResponse.class)
2323
);
2424
}
2525

0 commit comments

Comments
 (0)