(t *testing.T)
| 468 | } |
| 469 | |
| 470 | func TestUsersForTopic(t *testing.T) { |
| 471 | qOpts := types.QueryOpt{ |
| 472 | User: types.ParseUserId("usr" + testData.Users[0].Id), |
| 473 | Limit: 999, |
| 474 | } |
| 475 | gotSubs, err := adp.UsersForTopic("grpgRXf0rU4uR4", false, &qOpts) |
| 476 | if err != nil { |
| 477 | t.Fatal(err) |
| 478 | } |
| 479 | if len(gotSubs) != 1 { |
| 480 | t.Error(mismatchErrorString("Subs length", len(gotSubs), 1)) |
| 481 | } |
| 482 | |
| 483 | gotSubs, err = adp.UsersForTopic("grpgRXf0rU4uR4", true, nil) |
| 484 | if err != nil { |
| 485 | t.Fatal(err) |
| 486 | } |
| 487 | if len(gotSubs) != 2 { |
| 488 | t.Error(mismatchErrorString("Subs length", len(gotSubs), 2)) |
| 489 | } |
| 490 | |
| 491 | gotSubs, err = adp.UsersForTopic("p2p9AVDamaNCRbfKzGSh3mE0w", false, nil) |
| 492 | if err != nil { |
| 493 | t.Fatal(err) |
| 494 | } |
| 495 | if len(gotSubs) != 2 { |
| 496 | t.Error(mismatchErrorString("Subs length", len(gotSubs), 2)) |
| 497 | } |
| 498 | } |
| 499 | |
| 500 | func TestOwnTopics(t *testing.T) { |
| 501 | gotSubs, err := adp.OwnTopics(types.ParseUserId("usr" + testData.Users[0].Id)) |
nothing calls this directly
no test coverage detected
searching dependent graphs…