File tree Expand file tree Collapse file tree 4 files changed +18
-6
lines changed
Expand file tree Collapse file tree 4 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ public record StoryResponse(
77 String storeDistrict ,
88 String storeNeighborhood ,
99 String description ,
10- String imageUrl
10+ String imageUrl ,
11+ long memberId ,
12+ String memberNickname
1113) {
1214}
Original file line number Diff line number Diff line change @@ -101,7 +101,9 @@ public StoryResponse getStory(long storyId) {
101101 story .getAddressDistrict (),
102102 story .getAddressNeighborhood (),
103103 story .getDescription (),
104- imageStorage .getPreSignedUrl (story .getImageKey ())
104+ imageStorage .getPreSignedUrl (story .getImageKey ()),
105+ story .getMember ().getId (),
106+ story .getMember ().getNickname ()
105107 );
106108 }
107109}
Original file line number Diff line number Diff line change @@ -96,7 +96,9 @@ class GetStory {
9696 "성동구" ,
9797 "성수동" ,
9898 "곱창은 여기" ,
99- "https://s3.bucket.com/story1.jpg"
99+ "https://s3.bucket.com/story1.jpg" ,
100+ 1L ,
101+ "커찬"
100102 )).when (storyService ).getStory (storyId );
101103
102104 StoryResponse response = given ()
@@ -114,7 +116,9 @@ class GetStory {
114116 () -> assertThat (response .storeDistrict ()).isEqualTo ("성동구" ),
115117 () -> assertThat (response .storeNeighborhood ()).isEqualTo ("성수동" ),
116118 () -> assertThat (response .description ()).isEqualTo ("곱창은 여기" ),
117- () -> assertThat (response .imageUrl ()).isEqualTo ("https://s3.bucket.com/story1.jpg" )
119+ () -> assertThat (response .imageUrl ()).isEqualTo ("https://s3.bucket.com/story1.jpg" ),
120+ () -> assertThat (response .memberId ()).isEqualTo (1L ),
121+ () -> assertThat (response .memberNickname ()).isEqualTo ("커찬" )
118122 );
119123 }
120124
Original file line number Diff line number Diff line change @@ -164,7 +164,9 @@ class GetStory {
164164 fieldWithPath ("storeDistrict" ).description ("가게 주소의 구" ),
165165 fieldWithPath ("storeNeighborhood" ).description ("가게 주소의 동" ),
166166 fieldWithPath ("description" ).description ("스토리 내용" ),
167- fieldWithPath ("imageUrl" ).description ("스토리 이미지 URL" )
167+ fieldWithPath ("imageUrl" ).description ("스토리 이미지 URL" ),
168+ fieldWithPath ("memberId" ).description ("회원 ID" ),
169+ fieldWithPath ("memberNickname" ).description ("회원 닉네임" )
168170 );
169171
170172 @ Test
@@ -177,7 +179,9 @@ class GetStory {
177179 "성동구" ,
178180 "성수동" ,
179181 "곱창은 여기" ,
180- "https://s3.bucket.com/story1.jpg"
182+ "https://s3.bucket.com/story1.jpg" ,
183+ 1L ,
184+ "커찬"
181185 );
182186 doReturn (response ).when (storyService ).getStory (storyId );
183187
You can’t perform that action at this time.
0 commit comments