Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for assertEquals (0.34 sec)

  1. tests/hooks_test.go

    	if product.Name != "Product New3" || product.Price != 220 || product.Code != "L1213" {
    		t.Errorf("invalid data after update, got %+v", product)
    	}
    
    	var result Product3
    	DB.First(&result, product.ID)
    
    	AssertEqual(t, result, product)
    
    	// Select to change Code, but nothing updated, price should not change
    	DB.Model(&product).Select("code").Updates(Product3{Name: "L1214", Code: "L1213"})
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Feb 18 01:20:29 GMT 2023
    - 15.9K bytes
    - Viewed (0)
Back to top