forked from mirror/gorm
Format time first when testing
This commit is contained in:
parent
4a821a5bef
commit
f8c3ad6af3
|
@ -51,7 +51,7 @@ func TestCreate(t *testing.T) {
|
|||
|
||||
DB.Model(user).Update("name", "create_user_new_name")
|
||||
DB.First(&user, user.Id)
|
||||
if user.CreatedAt != newUser.CreatedAt {
|
||||
if user.CreatedAt.Format(time.RFC3339Nano) != newUser.CreatedAt.Format(time.RFC3339Nano) {
|
||||
t.Errorf("CreatedAt should not be changed after update")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue