fix(userstore): fix userstore test failure
This commit is contained in:
parent
23f16bb3c2
commit
f8bb187c89
1 changed files with 7 additions and 2 deletions
|
@ -210,8 +210,13 @@ func TestUserStores(t *testing.T) {
|
||||||
if len(users) != 2 {
|
if len(users) != 2 {
|
||||||
t.Fatalf("users size should be 2 (%d)", len(users))
|
t.Fatalf("users size should be 2 (%d)", len(users))
|
||||||
}
|
}
|
||||||
if users[0].ID != 0 || users[0].Name != rootName || users[0].Role != AdminRole {
|
for _, user := range users {
|
||||||
t.Fatalf("incorrect root info %v", users[0])
|
if user.ID == 0 && user.Name != rootName && user.Role != AdminRole {
|
||||||
|
t.Fatalf("incorrect root info %v", user)
|
||||||
|
}
|
||||||
|
if user.ID == VisitorID && user.Name != VisitorName && user.Role != VisitorRole {
|
||||||
|
t.Fatalf("incorrect visitor info %v", user)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue