mirror of
https://github.com/mattermost/focalboard.git
synced 2025-04-11 11:19:56 +02:00
Fixed a bug where images of the welcome board were not copied over. (#2453)
* Fixed a buig where images of welcome board were not copied over * Lint fixes * Fixed test * Fixed test
This commit is contained in:
parent
5c4b5585c8
commit
a30fef5848
@ -85,6 +85,10 @@ func (a *App) createWelcomeBoard(userID, workspaceID string) (string, error) {
|
||||
|
||||
blocks = model.GenerateBlockIDs(blocks, a.logger)
|
||||
|
||||
if errUpdateFileIDs := a.CopyCardFiles(onboardingBoardID, workspaceID, blocks); errUpdateFileIDs != nil {
|
||||
return "", errUpdateFileIDs
|
||||
}
|
||||
|
||||
// we're copying from a global template, so we need to set the
|
||||
// `isTemplate` flag to false on the board
|
||||
var welcomeBoardID string
|
||||
|
@ -38,6 +38,8 @@ func TestPrepareOnboardingTour(t *testing.T) {
|
||||
"user_id_1",
|
||||
).Return(nil)
|
||||
|
||||
th.Store.EXPECT().GetBlock(gomock.Any(), "block_id_1").Return(&welcomeBoard, nil)
|
||||
|
||||
th.Store.EXPECT().CreatePrivateWorkspace("user_id_1").Return("workspace_id_1", nil)
|
||||
|
||||
userPropPatch := model.UserPropPatch{
|
||||
@ -86,6 +88,8 @@ func TestCreateWelcomeBoard(t *testing.T) {
|
||||
"user_id_1",
|
||||
).Return(nil)
|
||||
|
||||
th.Store.EXPECT().GetBlock(gomock.Any(), "block_id_1").Return(&welcomeBoard, nil)
|
||||
|
||||
boardID, err := th.App.createWelcomeBoard("user_id_1", "workspace_id_1")
|
||||
assert.Nil(t, err)
|
||||
assert.NotEmpty(t, boardID)
|
||||
|
Loading…
x
Reference in New Issue
Block a user