Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for fatalf (0.2 sec)

  1. tests/associations_has_many_test.go

    		t.Fatalf("should only find no pet with invalid conditions, but got %v", count)
    	}
    
    	// Count
    	AssertAssociationCount(t, user, "Pets", 2, "")
    
    	// Append
    	pet := Pet{Name: "pet-has-many-append"}
    
    	if err := DB.Model(&user2).Association("Pets").Append(&pet); err != nil {
    		t.Fatalf("Error happened when append account, got %v", err)
    	}
    
    	if pet.ID == 0 {
    		t.Fatalf("Pet's ID should be created")
    	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 15.6K bytes
    - Viewed (0)
Back to top