From 178ccd16cba26144eac404f413440867b360033c Mon Sep 17 00:00:00 2001 From: Jonathan Date: Sat, 5 Aug 2017 19:52:35 -0400 Subject: System Console: Email notification content setting (#7122) * 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 --- utils/config_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'utils/config_test.go') diff --git a/utils/config_test.go b/utils/config_test.go index a6bfa4e82..e49073b8e 100644 --- a/utils/config_test.go +++ b/utils/config_test.go @@ -277,3 +277,13 @@ func TestValidateLocales(t *testing.T) { t.Fatal("Should have returned an error validating AvailableLocales") } } + +func TestGetClientConfig(t *testing.T) { + TranslationsPreInit() + LoadConfig("config.json") + + configMap := getClientConfig(Cfg) + if configMap["EmailNotificationContentsType"] != *Cfg.EmailSettings.EmailNotificationContentsType { + t.Fatal("EmailSettings.EmailNotificationContentsType not exposed to client config") + } +} -- cgit v1.2.3-1-g7c22