* Chore: Remove bus
* remove unused const
(cherry picked from commit 18e93c7077)
This commit is contained in:
@@ -107,25 +107,6 @@ func TestUserAPIEndpoint_userLoggedIn(t *testing.T) {
|
||||
}, mock)
|
||||
|
||||
loggedInUserScenario(t, "When calling GET on", "/api/users/lookup", "/api/users/lookup", func(sc *scenarioContext) {
|
||||
fakeNow := time.Date(2019, 2, 11, 17, 30, 40, 0, time.UTC)
|
||||
bus.AddHandler("test", func(ctx context.Context, query *models.GetUserByLoginQuery) error {
|
||||
require.Equal(t, "danlee", query.LoginOrEmail)
|
||||
|
||||
query.Result = &models.User{
|
||||
Id: int64(1),
|
||||
Email: "daniel@grafana.com",
|
||||
Name: "Daniel",
|
||||
Login: "danlee",
|
||||
Theme: "light",
|
||||
IsAdmin: true,
|
||||
OrgId: int64(2),
|
||||
IsDisabled: false,
|
||||
Updated: fakeNow,
|
||||
Created: fakeNow,
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
createUserCmd := models.CreateUserCommand{
|
||||
Email: fmt.Sprint("admin", "@test.com"),
|
||||
Name: "admin",
|
||||
|
||||
Reference in New Issue
Block a user