summaryrefslogtreecommitdiffstats
path: root/app/import_functions_test.go
diff options
context:
space:
mode:
authorSimone Salsi <thedos@terminus.space>2018-10-08 18:01:27 +0200
committerGeorge Goldberg <george@gberg.me>2018-10-08 17:01:27 +0100
commitfe9a81208e4d8290df7b8d89bac2d880c045b84b (patch)
tree79db085e0447214d18dd145ec99eb67c50ff61c1 /app/import_functions_test.go
parent9a4f3ce1e5b22a297eeb00b2aaff44f88304ae8c (diff)
downloadchat-fe9a81208e4d8290df7b8d89bac2d880c045b84b.tar.gz
chat-fe9a81208e4d8290df7b8d89bac2d880c045b84b.tar.bz2
chat-fe9a81208e4d8290df7b8d89bac2d880c045b84b.zip
Added the changes requested for MM-8860: Bulk import email intervals (#8498) (#9578)
MM-8860: Bulk import email intervals (#8498)
Diffstat (limited to 'app/import_functions_test.go')
-rw-r--r--app/import_functions_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/import_functions_test.go b/app/import_functions_test.go
index 2e710a3df..5e950d7d5 100644
--- a/app/import_functions_test.go
+++ b/app/import_functions_test.go
@@ -1079,6 +1079,7 @@ func TestImportImportUser(t *testing.T) {
UseMarkdownPreview: ptrStr("true"),
UseFormatting: ptrStr("true"),
ShowUnreadSection: ptrStr("true"),
+ EmailInterval: ptrStr("immediately"),
}
if err := th.App.ImportUser(&data, false); err != nil {
t.Fatalf("Should have succeeded.")
@@ -1099,6 +1100,7 @@ func TestImportImportUser(t *testing.T) {
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)
+ checkPreference(t, th.App, user.Id, model.PREFERENCE_CATEGORY_NOTIFICATIONS, model.PREFERENCE_NAME_EMAIL_INTERVAL, "30")
// Change those preferences.
data = UserImportData{
@@ -1110,6 +1112,7 @@ func TestImportImportUser(t *testing.T) {
MessageDisplay: ptrStr("clean"),
ChannelDisplayMode: ptrStr("full"),
TutorialStep: ptrStr("2"),
+ EmailInterval: ptrStr("hour"),
}
if err := th.App.ImportUser(&data, false); err != nil {
t.Fatalf("Should have succeeded.")
@@ -1122,6 +1125,7 @@ func TestImportImportUser(t *testing.T) {
checkPreference(t, th.App, user.Id, model.PREFERENCE_CATEGORY_DISPLAY_SETTINGS, model.PREFERENCE_NAME_MESSAGE_DISPLAY, *data.MessageDisplay)
checkPreference(t, th.App, user.Id, model.PREFERENCE_CATEGORY_DISPLAY_SETTINGS, model.PREFERENCE_NAME_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_NOTIFICATIONS, model.PREFERENCE_NAME_EMAIL_INTERVAL, "3600")
// Set Notify Props
data.NotifyProps = &UserNotifyPropsImportData{