summaryrefslogtreecommitdiffstats
path: root/app/import_functions_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/import_functions_test.go')
-rw-r--r--app/import_functions_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/import_functions_test.go b/app/import_functions_test.go
index 10b1d5587..c76915ac6 100644
--- a/app/import_functions_test.go
+++ b/app/import_functions_test.go
@@ -1016,6 +1016,7 @@ func TestImportImportUser(t *testing.T) {
data.Teams = &[]UserTeamImportData{
{
Name: &teamName,
+ Theme: ptrStr(`{"awayIndicator":"#DBBD4E","buttonBg":"#23A1FF","buttonColor":"#FFFFFF","centerChannelBg":"#ffffff","centerChannelColor":"#333333","codeTheme":"github","image":"/static/files/a4a388b38b32678e83823ef1b3e17766.png","linkColor":"#2389d7","mentionBg":"#2389d7","mentionColor":"#ffffff","mentionHighlightBg":"#fff2bb","mentionHighlightLink":"#2f81b7","newMessageSeparator":"#FF8800","onlineIndicator":"#7DBE00","sidebarBg":"#fafafa","sidebarHeaderBg":"#3481B9","sidebarHeaderTextColor":"#ffffff","sidebarText":"#333333","sidebarTextActiveBorder":"#378FD2","sidebarTextActiveColor":"#111111","sidebarTextHoverBg":"#e6f2fa","sidebarUnreadText":"#333333","type":"Mattermost"}`),
Roles: ptrStr("team_user team_admin"),
Channels: &[]UserChannelImportData{
{
@@ -1049,6 +1050,7 @@ func TestImportImportUser(t *testing.T) {
}
checkPreference(t, th.App, user.Id, model.PREFERENCE_CATEGORY_FAVORITE_CHANNEL, channel.Id, "true")
+ checkPreference(t, th.App, user.Id, model.PREFERENCE_CATEGORY_THEME, team.Id, *(*data.Teams)[0].Theme)
// No more new member objects.
if tmc, err := th.App.GetTeamMembers(team.Id, 0, 1000); err != nil {
@@ -1074,6 +1076,9 @@ func TestImportImportUser(t *testing.T) {
MessageDisplay: ptrStr("compact"),
ChannelDisplayMode: ptrStr("centered"),
TutorialStep: ptrStr("3"),
+ UseMarkdownPreview: ptrStr("true"),
+ UseFormatting: ptrStr("true"),
+ ShowUnreadSection: ptrStr("true"),
}
if err := th.App.ImportUser(&data, false); err != nil {
t.Fatalf("Should have succeeded.")
@@ -1091,6 +1096,9 @@ func TestImportImportUser(t *testing.T) {
checkPreference(t, th.App, user.Id, model.PREFERENCE_CATEGORY_DISPLAY_SETTINGS, "message_display", *data.MessageDisplay)
checkPreference(t, th.App, user.Id, model.PREFERENCE_CATEGORY_DISPLAY_SETTINGS, "channel_display_mode", *data.ChannelDisplayMode)
checkPreference(t, th.App, user.Id, model.PREFERENCE_CATEGORY_TUTORIAL_STEPS, user.Id, *data.TutorialStep)
+ checkPreference(t, th.App, user.Id, model.PREFERENCE_CATEGORY_ADVANCED_SETTINGS, "feature_enabled_markdown_preview", *data.UseMarkdownPreview)
+ checkPreference(t, th.App, user.Id, model.PREFERENCE_CATEGORY_ADVANCED_SETTINGS, "formatting", *data.UseFormatting)
+ checkPreference(t, th.App, user.Id, model.PREFERENCE_CATEGORY_SIDEBAR_SETTINGS, "show_unread_section", *data.ShowUnreadSection)
// Change those preferences.
data = UserImportData{