From 65af2c4abcf2ad40ea1517d882572ce9fbabb491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Efe=20Ak=C3=A7a?= Date: Mon, 16 Dec 2024 21:53:00 +0300 Subject: [PATCH] fix tests --- .../programminglanguagesforum/Services/TagServiceTests.java | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/test/java/com/group1/programminglanguagesforum/Services/TagServiceTests.java b/backend/src/test/java/com/group1/programminglanguagesforum/Services/TagServiceTests.java index 7a6a6b1..0f0f1d0 100644 --- a/backend/src/test/java/com/group1/programminglanguagesforum/Services/TagServiceTests.java +++ b/backend/src/test/java/com/group1/programminglanguagesforum/Services/TagServiceTests.java @@ -142,6 +142,7 @@ void testGetTagDetails_Success() { when(tagRepository.findById(tagId)).thenReturn(Optional.of(mockTag)); when(questionRepository.findQuestionsByTagId(tagId)).thenReturn(mockQuestions); + when(questionRepository.findQuestionsByDifficultyAndTagId(tagId)).thenReturn(mockQuestions); // Mocking modelMapper behavior when(modelMapper.map(any(Question.class), eq(GetQuestionWithTagDto.class)))