-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
22 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -308,6 +308,7 @@ void createRecipe() { | |
@WithLoginUser(email = "[email protected]") | ||
@DisplayName("๋ ์ํผ๋ฅผ ์์ ํ๋ค.") | ||
void updateRecipe() { | ||
long recipeId = 1L; | ||
List<String> categories = List.of("Dessert", "NewCategory"); | ||
List<String> substitutions = List.of("Water", "Orange"); | ||
List<IngredientCreateRequest> ingredients = List.of( | ||
|
@@ -319,7 +320,6 @@ void updateRecipe() { | |
new RecipeStepRequest(null, "์คํ 2 ์ค๋ช ", 2, "00:20:00") | ||
); | ||
RecipeUpdateRequest recipeUpdateRequest = new RecipeUpdateRequest( | ||
1L, | ||
"๋ณ๊ฒฝ๋ ๋ ์ํผ ์ ๋ชฉ", | ||
"00:30:00", | ||
"๋ณ๊ฒฝ๋ ์ธ๋ค์ผ.jpg", | ||
|
@@ -353,7 +353,7 @@ void updateRecipe() { | |
))) | ||
.contentType(ContentType.JSON) | ||
.body(recipeUpdateRequest) | ||
.when().put("/recipes") | ||
.when().put("/recipes/" + recipeId) | ||
.then().log().all() | ||
.statusCode(200); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,9 +109,10 @@ void createRecipe() { | |
} | ||
|
||
@Test | ||
@DisplayName("์๋ก์ด ๋ ์ํผ๋ฅผ ์์ฑํ๋ค.") | ||
@DisplayName("๋ ์ํผ๋ฅผ ์์ ํ๋ค.") | ||
void updateRecipe() { | ||
UserInfo userInfo = new UserInfo(1L, "[email protected]"); | ||
Long recipeId = 1L; | ||
|
||
List<String> categories = List.of("๋ณ๊ฒฝ๋ ์นดํ ๊ณ ๋ฆฌ 1", "๋ณ๊ฒฝ๋ ์นดํ ๊ณ ๋ฆฌ 2"); | ||
List<String> substitutions = List.of("๋ณ๊ฒฝ๋ ์ฌ๋ฃ 1", "๋ณ๊ฒฝ๋ ์ฌ๋ฃ 2"); | ||
|
@@ -124,7 +125,6 @@ void updateRecipe() { | |
new RecipeStepRequest(null, "๋ณ๊ฒฝ๋ ์คํ 2 ์ค๋ช ", 2, "00:30:00") | ||
); | ||
RecipeUpdateRequest recipeUpdateRecipe = new RecipeUpdateRequest( | ||
1L, | ||
"๋ณ๊ฒฝ๋ ์ ๋ชฉ", | ||
"00:10:00", | ||
"๋ณ๊ฒฝ๋ ๋ ์ํผ ์ธ๋ค์ผ.jpg", | ||
|
@@ -135,7 +135,7 @@ void updateRecipe() { | |
recipeStepRequests | ||
); | ||
|
||
recipeService.updateRecipe(userInfo, recipeUpdateRecipe); | ||
recipeService.updateRecipe(userInfo, recipeId, recipeUpdateRecipe); | ||
|
||
Recipe recipe = recipeRepository.findById(1L).orElseThrow(); | ||
assertAll( | ||
|