================== Create tests ================================
(t *testing.T)
| 55 | |
| 56 | // ================== Create tests ================================ |
| 57 | func TestUserCreate(t *testing.T) { |
| 58 | for _, user := range testData.Users { |
| 59 | if err := adp.UserCreate(user); err != nil { |
| 60 | t.Error(err) |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | cursor, err := rdb.Table("users").Count().Run(conn) |
| 65 | if err != nil { |
| 66 | t.Error(err) |
| 67 | } |
| 68 | defer cursor.Close() |
| 69 | |
| 70 | var count int |
| 71 | if err = cursor.One(&count); err != nil { |
| 72 | t.Error(err) |
| 73 | } |
| 74 | if count == 0 { |
| 75 | t.Error("No users created!") |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | func TestCredUpsert(t *testing.T) { |
| 80 | // Test just inserts: |
nothing calls this directly
no test coverage detected
searching dependent graphs…