Skip to content

Commit

Permalink
fix unit test 2
Browse files Browse the repository at this point in the history
  • Loading branch information
wiggin77 committed Mar 31, 2022
1 parent 69b4baa commit 92a5c36
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/app/templates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ func TestApp_initializeTemplates(t *testing.T) {
Blocks: []model.Block{block},
}

boardMember := &model.BoardMember{
BoardID: board.ID,
UserID: "test-user",
}

t.Run("Needs template init", func(t *testing.T) {
th, tearDown := SetupTestHelper(t)
defer tearDown()
Expand All @@ -42,6 +47,8 @@ func TestApp_initializeTemplates(t *testing.T) {
th.Store.EXPECT().RemoveDefaultTemplates([]*model.Board{}).Return(nil)
th.Store.EXPECT().CreateBoardsAndBlocks(gomock.Any(), gomock.Any()).AnyTimes().Return(boardsAndBlocks, nil)
th.Store.EXPECT().GetMembersForBoard(board.ID).AnyTimes().Return([]*model.BoardMember{}, nil)
th.Store.EXPECT().GetBoard(board.ID).AnyTimes().Return(board, nil)
th.Store.EXPECT().GetMemberForBoard(gomock.Any(), gomock.Any()).AnyTimes().Return(boardMember, nil)

th.FilesBackend.On("WriteFile", mock.Anything, mock.Anything).Return(int64(1), nil)

Expand Down

0 comments on commit 92a5c36

Please sign in to comment.