(t *testing.T)
| 278 | } |
| 279 | |
| 280 | func TestUserGetAll(t *testing.T) { |
| 281 | // Test not found (dummy UIDs). |
| 282 | got, err := adp.UserGetAll(dummyUid1, dummyUid2) |
| 283 | if err != nil { |
| 284 | t.Fatal(err) |
| 285 | } |
| 286 | if len(got) > 0 { |
| 287 | t.Error("result users should be zero length, got", len(got)) |
| 288 | } |
| 289 | |
| 290 | got, err = adp.UserGetAll(types.ParseUserId("usr"+testData.Users[0].Id), types.ParseUserId("usr"+testData.Users[1].Id)) |
| 291 | if err != nil { |
| 292 | t.Fatal(err) |
| 293 | } |
| 294 | if len(got) != 2 { |
| 295 | t.Fatal(mismatchErrorString("resultUsers length", len(got), 2)) |
| 296 | } |
| 297 | for i, usr := range got { |
| 298 | // User agent is not compared. |
| 299 | usr.UserAgent = testData.Users[i].UserAgent |
| 300 | if !reflect.DeepEqual(&usr, testData.Users[i]) { |
| 301 | t.Error(mismatchErrorString("User", &usr, testData.Users[i])) |
| 302 | } |
| 303 | } |
| 304 | } |
| 305 | |
| 306 | func TestUserGetByCred(t *testing.T) { |
| 307 | // Test not found |
nothing calls this directly
no test coverage detected
searching dependent graphs…