MustExec fails the test if the given database query has error
(t *testing.T, db *gorm.DB, message string)
| 180 | |
| 181 | // MustExec fails the test if the given database query has error |
| 182 | func MustExec(t *testing.T, db *gorm.DB, message string) { |
| 183 | if err := db.Error; err != nil { |
| 184 | t.Fatalf("%s: %s", message, err.Error()) |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | // GetCookieByName returns a cookie with the given name |
| 189 | func GetCookieByName(cookies []*http.Cookie, name string) *http.Cookie { |