- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestCreateInvalidSlice (0.13 sec)
-
tests/create_test.go
} sliceMap := []map[string]interface{}{} if err := DB.Model(&User{}).Create(&sliceMap).Error; err != gorm.ErrEmptySlice { t.Errorf("no data should be created, got %v", err) } } func TestCreateInvalidSlice(t *testing.T) { users := []*User{ GetUser("invalid_slice_1", Config{}), GetUser("invalid_slice_2", Config{}), nil, } if err := DB.Create(&users).Error; !errors.Is(err, gorm.ErrInvalidData) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 26.4K bytes - Viewed (0)