MCPcopy
hub / github.com/tinode/chat / TestChannelsForUser

Function TestChannelsForUser

server/db/rethinkdb/tests/rethink_test.go:506–516  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

504}
505
506func TestChannelsForUser(t *testing.T) {
507 // Test RethinkDB specific method
508 channels, err := adp.ChannelsForUser(types.ParseUserId("usr" + testData.Users[0].Id))
509 if err != nil {
510 t.Fatal(err)
511 }
512 // Should return empty slice since we don't have channel subscriptions in test data
513 if len(channels) != 0 {
514 t.Error(mismatchErrorString("Channels length", len(channels), 0))
515 }
516}
517
518func TestSubscriptionGet(t *testing.T) {
519 got, err := adp.SubscriptionGet(testData.Topics[0].Id, types.ParseUserId("usr"+testData.Users[0].Id), false)

Callers

nothing calls this directly

Calls 4

ParseUserIdFunction · 0.92
ErrorMethod · 0.80
mismatchErrorStringFunction · 0.70
ChannelsForUserMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…