MCPcopy Index your code
hub / github.com/tinode/chat / TestTopicCreate

Function TestTopicCreate

server/db/postgres/tests/postgres_test.go:141–159  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

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

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…