Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for CreateUserExistingTimestamp (0.25 sec)

  1. tests/create_test.go

    		t.Errorf("should returns error invalid data when creating from slice that contains invalid data")
    	}
    }
    
    func TestCreateWithExistingTimestamp(t *testing.T) {
    	user := User{Name: "CreateUserExistingTimestamp"}
    	curTime := now.MustParse("2016-01-01")
    	user.CreatedAt = curTime
    	user.UpdatedAt = curTime
    	DB.Save(&user)
    
    	AssertEqual(t, user.CreatedAt, curTime)
    	AssertEqual(t, user.UpdatedAt, curTime)
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 26.4K bytes
    - Viewed (0)
Back to top