mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
21 lines
392 B
Go
21 lines
392 B
Go
|
package usertest
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"github.com/grafana/grafana/pkg/services/user"
|
||
|
)
|
||
|
|
||
|
type FakeUserService struct {
|
||
|
ExpectedUser *user.User
|
||
|
ExpectedError error
|
||
|
}
|
||
|
|
||
|
func NewUserServiceFake() *FakeUserService {
|
||
|
return &FakeUserService{}
|
||
|
}
|
||
|
|
||
|
func (f *FakeUserService) Create(ctx context.Context, cmd *user.CreateUserCommand) (*user.User, error) {
|
||
|
return f.ExpectedUser, f.ExpectedError
|
||
|
}
|