feat: topics, recipe messages
This commit is contained in:
parent
ee16265cb8
commit
8e24e47813
7 changed files with 160 additions and 7 deletions
|
|
@ -9,6 +9,7 @@ import org.junit.jupiter.api.TestInfo;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.messaging.simp.SimpMessagingTemplate;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
import server.database.RecipeRepository;
|
||||
|
||||
|
|
@ -30,6 +31,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
// This config uses an in-memory database
|
||||
@ActiveProfiles("mock-data-test")
|
||||
public class RecipeControllerTest {
|
||||
|
||||
@Autowired
|
||||
private SimpMessagingTemplate template;
|
||||
|
||||
private RecipeController controller;
|
||||
private List<Recipe> recipes;
|
||||
private final RecipeRepository recipeRepository;
|
||||
|
|
@ -48,7 +53,7 @@ public class RecipeControllerTest {
|
|||
.range(0, NUM_RECIPES)
|
||||
.mapToObj(x -> new Recipe(null, "Recipe " + x, List.of(), List.of()))
|
||||
.toList();
|
||||
controller = new RecipeController(recipeRepository);
|
||||
controller = new RecipeController(recipeRepository, template);
|
||||
Set<String> tags = info.getTags();
|
||||
List<Long> ids = new ArrayList<>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue