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

Function TestUserCreate

server/db/postgres/tests/postgres_test.go:61–76  ·  view source on GitHub ↗

================== Create tests ================================

(t *testing.T)

Source from the content-addressed store, hash-verified

59
60// ================== Create tests ================================
61func TestUserCreate(t *testing.T) {
62 for _, user := range testData.Users {
63 if err := adp.UserCreate(user); err != nil {
64 t.Error(err)
65 }
66 }
67 var count int
68
69 err := db.QueryRow(ctx, "SELECT COUNT(*) FROM users").Scan(&count)
70 if err != nil {
71 t.Error(err)
72 }
73 if count == 0 {
74 t.Error("No users created!")
75 }
76}
77
78func TestCredUpsert(t *testing.T) {
79 // Test just inserts:

Callers

nothing calls this directly

Calls 3

ErrorMethod · 0.80
UserCreateMethod · 0.65
ScanMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…