================== Create tests ================================
(t *testing.T)
| 59 | |
| 60 | // ================== Create tests ================================ |
| 61 | func 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 | |
| 78 | func TestCredUpsert(t *testing.T) { |
| 79 | // Test just inserts: |
nothing calls this directly
no test coverage detected
searching dependent graphs…