Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestHasOneAssociationForSlice (0.19 sec)

  1. tests/associations_has_one_test.go

    	var account Account
    	DB.Model(&user).Association("Account").Find(&account)
    	if account.Number != "" {
    		t.Errorf("account's number should not be saved")
    	}
    }
    
    func TestHasOneAssociationForSlice(t *testing.T) {
    	users := []User{
    		*GetUser("slice-hasone-1", Config{Account: true}),
    		*GetUser("slice-hasone-2", Config{Account: false}),
    		*GetUser("slice-hasone-3", Config{Account: true}),
    	}
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 7.1K bytes
    - Viewed (0)
Back to top