Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestCreateNilPointer (0.1 sec)

  1. tests/create_test.go

    		t.Errorf("invalid insert SQL, got %v", result.Statement.SQL.String())
    	}
    }
    
    func TestCreateNilPointer(t *testing.T) {
    	var user *User
    
    	err := DB.Create(user).Error
    	if err == nil || err != gorm.ErrInvalidValue {
    		t.Fatalf("it is not ErrInvalidValue")
    	}
    }
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Tue Mar 19 03:50:28 UTC 2024
    - 26.4K bytes
    - Viewed (0)
Back to top