Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for AssertAssociationCount (0.17 sec)

  1. tests/associations_belongs_to_test.go

    	user.ManagerID = &manager2.ID
    	CheckUser(t, user2, user)
    
    	AssertAssociationCount(t, user2, "Company", 1, "AfterReplace")
    	AssertAssociationCount(t, user2, "Manager", 1, "AfterReplace")
    
    	// Delete
    	if err := DB.Model(&user2).Association("Company").Delete(&Company{}); err != nil {
    		t.Fatalf("Error happened when delete Company, got %v", err)
    	}
    	AssertAssociationCount(t, user2, "Company", 1, "after delete non-existing data")
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 9.3K bytes
    - Viewed (0)
Back to top