github.com/qichengzx/mattermost-server@v4.5.1-0.20180604164826-2c75247c97d0+incompatible/api4/ldap_test.go (about) 1 // Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. 2 // See License.txt for license information. 3 4 package api4 5 6 import ( 7 "testing" 8 ) 9 10 func TestLdapTest(t *testing.T) { 11 th := Setup().InitBasic().InitSystemAdmin() 12 defer th.TearDown() 13 14 _, resp := th.Client.TestLdap() 15 CheckForbiddenStatus(t, resp) 16 17 _, resp = th.SystemAdminClient.TestLdap() 18 CheckNotImplementedStatus(t, resp) 19 } 20 21 func TestLdapSync(t *testing.T) { 22 th := Setup().InitBasic().InitSystemAdmin() 23 defer th.TearDown() 24 25 _, resp := th.SystemAdminClient.SyncLdap() 26 CheckNoError(t, resp) 27 28 _, resp = th.Client.SyncLdap() 29 CheckForbiddenStatus(t, resp) 30 }