* PLT-7195: Added new config option, new license feature, and config UI to system console. Still need to implement behaviour change in email batching code * PLT-7195: Modified batch emails to respect email notification content type setting * PLT-7195: Tweaking the colours a bit * PLT-7195: Added support for email notification content type setting in immediate (non-batched) notification messages. Attempted to clean up the code somewhat. Unit tests coming in a future commit * PLT-7195: Added unit tests for non-batched emails * Checked license when applying email content settings * Changed return type of getFormattedPostTime
27 строки
641 B
Go
27 строки
641 B
Go
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
package model
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestConfigDefaultFileSettingsDirectory(t *testing.T) {
|
|
c1 := Config{}
|
|
c1.SetDefaults()
|
|
|
|
if c1.FileSettings.Directory != "./data/" {
|
|
t.Fatal("FileSettings.Directory should default to './data/'")
|
|
}
|
|
}
|
|
|
|
func TestConfigDefaultEmailNotificationContentsType(t *testing.T) {
|
|
c1 := Config{}
|
|
c1.SetDefaults()
|
|
|
|
if *c1.EmailSettings.EmailNotificationContentsType != EMAIL_NOTIFICATION_CONTENTS_FULL {
|
|
t.Fatal("EmailSettings.EmailNotificationContentsType should default to 'full'")
|
|
}
|
|
}
|