Implement admin LDAP endpoints for APIv4 (#5720)

Этот коммит содержится в:
Joram Wilander
2017-03-14 08:43:40 -04:00
коммит произвёл GitHub
родитель a71a9fc3bf
Коммит ee457176bd
5 изменённых файлов: 110 добавлений и 0 удалений

30
api4/ldap_test.go Обычный файл
Просмотреть файл

@@ -0,0 +1,30 @@
// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package api4
import (
"testing"
)
func TestLdapTest(t *testing.T) {
th := Setup().InitBasic().InitSystemAdmin()
defer TearDown()
_, resp := th.Client.TestLdap()
CheckForbiddenStatus(t, resp)
_, resp = th.SystemAdminClient.TestLdap()
CheckNotImplementedStatus(t, resp)
}
func TestLdapSync(t *testing.T) {
th := Setup().InitBasic().InitSystemAdmin()
defer TearDown()
_, resp := th.SystemAdminClient.SyncLdap()
CheckNoError(t, resp)
_, resp = th.Client.SyncLdap()
CheckForbiddenStatus(t, resp)
}