Skip to content

Commit

Permalink
Format time first when testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhu committed Dec 25, 2015
1 parent 4a821a5 commit f8c3ad6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
Expand Down

0 comments on commit f8c3ad6

Please sign in to comment.