summaryrefslogtreecommitdiffstats
path: root/api/admin_test.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-09-01 17:05:20 -0400
committerGitHub <noreply@github.com>2016-09-01 17:05:20 -0400
commit5d7f2399620281dde1f4f85e1812aac9f18c96f9 (patch)
treebeba814a678dff6c0fb1da9a728e49af144d9d24 /api/admin_test.go
parent949e57076aa41584b4104abc2bed98c5f9d91165 (diff)
downloadchat-5d7f2399620281dde1f4f85e1812aac9f18c96f9.tar.gz
chat-5d7f2399620281dde1f4f85e1812aac9f18c96f9.tar.bz2
chat-5d7f2399620281dde1f4f85e1812aac9f18c96f9.zip
Adding LDAP test connection button. Reordering LDAP settings. (#3912)
Diffstat (limited to 'api/admin_test.go')
-rw-r--r--api/admin_test.go12
1 files changed, 12 insertions, 0 deletions
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)