From 5d7f2399620281dde1f4f85e1812aac9f18c96f9 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 1 Sep 2016 17:05:20 -0400 Subject: Adding LDAP test connection button. Reordering LDAP settings. (#3912) --- api/admin_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'api/admin_test.go') diff --git a/api/admin_test.go b/api/admin_test.go index 967e3ceb3..3d8a95676 100644 --- a/api/admin_test.go +++ b/api/admin_test.go @@ -161,6 +161,18 @@ func TestEmailTest(t *testing.T) { } } +func TestLdapTest(t *testing.T) { + th := Setup().InitBasic().InitSystemAdmin() + + if _, err := th.BasicClient.TestLdap(utils.Cfg); err == nil { + t.Fatal("Shouldn't have permissions") + } + + if _, err := th.SystemAdminClient.TestLdap(utils.Cfg); err == nil { + t.Fatal("should have errored") + } +} + func TestGetTeamAnalyticsStandard(t *testing.T) { th := Setup().InitBasic().InitSystemAdmin() th.CreatePrivateChannel(th.BasicClient, th.BasicTeam) -- cgit v1.2.3-1-g7c22