summaryrefslogtreecommitdiffstats
path: root/utils/mail_test.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2018-01-12 08:02:11 -0600
committerJoram Wilander <jwawilander@gmail.com>2018-01-12 09:02:11 -0500
commit7e5ce976681e99be6b26d428935ba1106d530efa (patch)
treee050da49c943bf77f57b03eceb0b650114c7f1b6 /utils/mail_test.go
parent3d3a234fca1d2ee43f5c4fc8961d44fde2512c82 (diff)
downloadchat-7e5ce976681e99be6b26d428935ba1106d530efa.tar.gz
chat-7e5ce976681e99be6b26d428935ba1106d530efa.tar.bz2
chat-7e5ce976681e99be6b26d428935ba1106d530efa.zip
Remove global cfg vars (#8099)
* remove global cfg vars * enterprise update
Diffstat (limited to 'utils/mail_test.go')
-rw-r--r--utils/mail_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/mail_test.go b/utils/mail_test.go
index a4444eb2e..574f71f46 100644
--- a/utils/mail_test.go
+++ b/utils/mail_test.go
@@ -6,10 +6,13 @@ package utils
import (
"strings"
"testing"
+
+ "github.com/stretchr/testify/require"
)
func TestMailConnection(t *testing.T) {
- cfg := LoadGlobalConfig("config.json")
+ cfg, _, err := LoadConfig("config.json")
+ require.Nil(t, err)
if conn, err := connectToSMTPServer(cfg); err != nil {
t.Log(err)
@@ -32,7 +35,8 @@ func TestMailConnection(t *testing.T) {
}
func TestSendMailUsingConfig(t *testing.T) {
- cfg := LoadGlobalConfig("config.json")
+ cfg, _, err := LoadConfig("config.json")
+ require.Nil(t, err)
T = GetUserTranslations("en")
var emailTo string = "test@example.com"