From 342d0c8b11af2c14664a46f5a13391033abb2e28 Mon Sep 17 00:00:00 2001 From: Matthias Reumann Date: Thu, 17 Aug 2023 15:46:40 +0200 Subject: [PATCH] Remove now unnecessary test --- api/stream_test.go | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/api/stream_test.go b/api/stream_test.go index 3b8420715..db1b59da2 100644 --- a/api/stream_test.go +++ b/api/stream_test.go @@ -539,35 +539,6 @@ func TestStreamVideoSections(t *testing.T) { Middlewares: testutils.GetMiddlewares(tools.ErrorHandler, testutils.TUMLiveContext(testutils.TUMLiveContextAdmin)), ExpectedCode: http.StatusBadRequest, }, - "GetFileById returns error": { - Router: func(r *gin.Engine) { - wrapper := dao.DaoWrapper{ - StreamsDao: testutils.GetStreamMock(t), - CoursesDao: testutils.GetCoursesMock(t), - VideoSectionDao: func() dao.VideoSectionDao { - sectionMock := mock_dao.NewMockVideoSectionDao(gomock.NewController(t)) - sectionMock. - EXPECT(). - Get(section.ID). - Return(section, nil). - AnyTimes() - return sectionMock - }(), - FileDao: func() dao.FileDao { - fileMock := mock_dao.NewMockFileDao(gomock.NewController(t)) - fileMock. - EXPECT(). - GetFileById(fmt.Sprintf("%d", section.ID)). - Return(model.File{}, errors.New("")). - AnyTimes() - return fileMock - }(), - } - configGinStreamRestRouter(r, wrapper) - }, - Middlewares: testutils.GetMiddlewares(tools.ErrorHandler, testutils.TUMLiveContext(testutils.TUMLiveContextAdmin)), - ExpectedCode: http.StatusNotFound, - }, "Delete returns error": { Router: func(r *gin.Engine) { wrapper := dao.DaoWrapper{