From ca8f79e2d19988ac8d1aaf4e4293f64d6614b7ba Mon Sep 17 00:00:00 2001 From: Asli Aykan Date: Thu, 19 Dec 2024 23:22:58 +0300 Subject: [PATCH] tests updated --- .../aet/artemis/communication/AbstractConversationTest.java | 1 + .../aet/artemis/communication/ChannelIntegrationTest.java | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/test/java/de/tum/cit/aet/artemis/communication/AbstractConversationTest.java b/src/test/java/de/tum/cit/aet/artemis/communication/AbstractConversationTest.java index ee5556a87372..0c1952c01941 100644 --- a/src/test/java/de/tum/cit/aet/artemis/communication/AbstractConversationTest.java +++ b/src/test/java/de/tum/cit/aet/artemis/communication/AbstractConversationTest.java @@ -180,6 +180,7 @@ ChannelDTO createChannel(boolean isPublicChannel, String name) throws Exception channelDTO.setIsPublic(isPublicChannel); channelDTO.setIsAnnouncementChannel(false); channelDTO.setDescription("general channel"); + channelDTO.setIsCourseWide(false); var chat = request.postWithResponseBody("/api/courses/" + exampleCourseId + "/channels", channelDTO, ChannelDTO.class, HttpStatus.CREATED); resetWebsocketMock(); diff --git a/src/test/java/de/tum/cit/aet/artemis/communication/ChannelIntegrationTest.java b/src/test/java/de/tum/cit/aet/artemis/communication/ChannelIntegrationTest.java index e737f2be49b2..cd67a16c842a 100644 --- a/src/test/java/de/tum/cit/aet/artemis/communication/ChannelIntegrationTest.java +++ b/src/test/java/de/tum/cit/aet/artemis/communication/ChannelIntegrationTest.java @@ -135,6 +135,7 @@ private void isAllowedToCreateChannelTest(boolean isPublicChannel, String loginN channelDTO.setIsPublic(isPublicChannel); channelDTO.setIsAnnouncementChannel(false); channelDTO.setDescription("general channel"); + channelDTO.setIsCourseWide(false); // when var chat = request.postWithResponseBody("/api/courses/" + exampleCourseId + "/channels", channelDTO, ChannelDTO.class, HttpStatus.CREATED); @@ -169,6 +170,7 @@ void createTest_messagingDeactivated(CourseInformationSharingConfiguration cours channelDTO.setIsAnnouncementChannel(false); channelDTO.setName(TEST_PREFIX); channelDTO.setDescription("general channel"); + channelDTO.setIsCourseWide(false); expectCreateForbidden(channelDTO); @@ -187,6 +189,7 @@ void update_messagingFeatureDeactivated_shouldReturnForbidden() throws Exception channelDTO.setIsAnnouncementChannel(false); channelDTO.setName(TEST_PREFIX); channelDTO.setDescription("general channel"); + channelDTO.setIsCourseWide(false); expectUpdateForbidden(1L, channelDTO); @@ -232,6 +235,7 @@ void createChannel_asNonCourseInstructorOrTutorOrEditor_shouldReturnForbidden(bo channelDTO.setIsPublic(isPublicChannel); channelDTO.setIsAnnouncementChannel(false); channelDTO.setDescription("general channel"); + channelDTO.setIsCourseWide(false); // then expectCreateForbidden(channelDTO); @@ -930,6 +934,7 @@ void createFeedbackChannel_asStudent_shouldReturnForbidden() { channelDTO.setDescription("Discussion channel for feedback"); channelDTO.setIsPublic(true); channelDTO.setIsAnnouncementChannel(false); + channelDTO.setIsCourseWide(false); FeedbackChannelRequestDTO feedbackChannelRequest = new FeedbackChannelRequestDTO(channelDTO, "Sample feedback text"); @@ -954,6 +959,7 @@ void createFeedbackChannel_asInstructor_shouldCreateChannel() { channelDTO.setDescription("Discussion channel for feedback"); channelDTO.setIsPublic(true); channelDTO.setIsAnnouncementChannel(false); + channelDTO.setIsCourseWide(false); FeedbackChannelRequestDTO feedbackChannelRequest = new FeedbackChannelRequestDTO(channelDTO, "Sample feedback text");