- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for CreateUserTimestampOverride (0.11 sec)
-
tests/create_test.go
DB.First(&newUser, user.ID) AssertEqual(t, newUser.CreatedAt, curTime) AssertEqual(t, newUser.UpdatedAt, curTime) } func TestCreateWithNowFuncOverride(t *testing.T) { user := User{Name: "CreateUserTimestampOverride"} curTime := now.MustParse("2016-01-01") NEW := DB.Session(&gorm.Session{ NowFunc: func() time.Time { return curTime }, }) NEW.Save(&user)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 26.4K bytes - Viewed (0)