Mono repo -> Master (#22553)
Combines the following repositories into one: https://github.com/mattermost/mattermost-server https://github.com/mattermost/mattermost-webapp https://github.com/mattermost/focalboard https://github.com/mattermost/mattermost-plugin-playbooks
Этот коммит содержится в:
39
server/channels/app/users/service_test.go
Обычный файл
39
server/channels/app/users/service_test.go
Обычный файл
@@ -0,0 +1,39 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
package users
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/mattermost/mattermost-server/v6/model"
|
||||
)
|
||||
|
||||
func TestNew(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.SkipNow()
|
||||
}
|
||||
_, err := New(ServiceConfig{})
|
||||
require.Error(t, err)
|
||||
|
||||
dbStore := mainHelper.GetStore()
|
||||
|
||||
cfn := func() *model.Config {
|
||||
return &model.Config{}
|
||||
}
|
||||
|
||||
lfn := func() *model.License {
|
||||
return model.NewTestLicense()
|
||||
}
|
||||
|
||||
_, err = New(ServiceConfig{
|
||||
UserStore: dbStore.User(),
|
||||
SessionStore: dbStore.Session(),
|
||||
OAuthStore: dbStore.OAuth(),
|
||||
ConfigFn: cfn,
|
||||
LicenseFn: lfn,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
}
|
||||
Ссылка в новой задаче
Block a user