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

Function TestTopicCreate

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

Source from the content-addressed store, hash-verified

140}
141
142func TestTopicCreate(t *testing.T) {
143 err := adp.TopicCreate(testData.Topics[0])
144 if err != nil {
145 t.Error(err)
146 }
147 // Update topic SeqId because it's not saved at creation time but used by the tests.
148 err = adp.TopicUpdate(testData.Topics[0].Id, map[string]interface{}{
149 "SeqId": testData.Topics[0].SeqId,
150 })
151 if err != nil {
152 t.Error(err)
153 }
154
155 for _, tpc := range testData.Topics[3:] {
156 err = adp.TopicCreate(tpc)
157 if err != nil {
158 t.Error(err)
159 }
160 }
161}
162
163func TestTopicCreateP2P(t *testing.T) {
164 err := adp.TopicCreateP2P(testData.Subs[2], testData.Subs[3])

Callers

nothing calls this directly

Calls 3

ErrorMethod · 0.80
TopicCreateMethod · 0.65
TopicUpdateMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…