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