summaryrefslogtreecommitdiffstats
path: root/api/admin_test.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-05-26 04:55:37 -0700
committerJoram Wilander <jwawilander@gmail.com>2016-05-26 07:55:37 -0400
commit56cca6be7cb3e15a99960c4e6c931081fd157d68 (patch)
treefdf5e7e8b61d787889ad983c3ac2b2df8cd9dc4a /api/admin_test.go
parent7b2538fc6c62175622b46d497c4048a7ccb762d1 (diff)
downloadchat-56cca6be7cb3e15a99960c4e6c931081fd157d68.tar.gz
chat-56cca6be7cb3e15a99960c4e6c931081fd157d68.tar.bz2
chat-56cca6be7cb3e15a99960c4e6c931081fd157d68.zip
PLT-2976 Adding checkout for missing SMTP server when testing email connection (#3115)
* PLT-2976 Adding checkout for missing SMTP server when testing email connection * Fixing unit test
Diffstat (limited to 'api/admin_test.go')
-rw-r--r--api/admin_test.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/api/admin_test.go b/api/admin_test.go
index 16ae62f7a..2b45fd30a 100644
--- a/api/admin_test.go
+++ b/api/admin_test.go
@@ -138,8 +138,13 @@ func TestEmailTest(t *testing.T) {
t.Fatal("Shouldn't have permissions")
}
- if _, err := th.SystemAdminClient.TestEmail(utils.Cfg); err != nil {
- t.Fatal(err)
+ if _, err := th.SystemAdminClient.TestEmail(utils.Cfg); err == nil {
+ t.Fatal("should have errored")
+ } else {
+ println(err.Id)
+ if err.Id != "api.admin.test_email.missing_server" {
+ t.Fatal(err)
+ }
}
}