@@ -57,7 +57,6 @@ import (
57
57
)
58
58
59
59
func TestPreloadWithAssociations (t * testing.T ) {
60
- t .Skip ()
61
60
user := * GetUser ("preload_with_associations" , Config {
62
61
Account : true ,
63
62
Pets : 2 ,
@@ -95,7 +94,6 @@ func TestPreloadWithAssociations(t *testing.T) {
95
94
}
96
95
97
96
func TestNestedPreload (t * testing.T ) {
98
- t .Skip ()
99
97
user := * GetUser ("nested_preload" , Config {Pets : 2 })
100
98
101
99
for idx , pet := range user .Pets {
@@ -209,7 +207,6 @@ func TestPreloadWithConds(t *testing.T) {
209
207
}
210
208
211
209
func TestNestedPreloadWithConds (t * testing.T ) {
212
- t .Skip ()
213
210
users := []User {
214
211
* GetUser ("slice_nested_preload_1" , Config {Pets : 2 }),
215
212
* GetUser ("slice_nested_preload_2" , Config {Pets : 0 }),
@@ -300,7 +297,6 @@ func TestPreloadGoroutine(t *testing.T) {
300
297
}
301
298
302
299
func TestPreloadWithDiffModel (t * testing.T ) {
303
- t .Skip ()
304
300
user := * GetUser ("preload_with_diff_model" , Config {Account : true })
305
301
306
302
if err := DB .Create (& user ).Error ; err != nil {
@@ -319,7 +315,6 @@ func TestPreloadWithDiffModel(t *testing.T) {
319
315
}
320
316
321
317
func TestNestedPreloadWithUnscoped (t * testing.T ) {
322
- t .Skip ()
323
318
user := * GetUser ("nested_preload" , Config {Pets : 1 })
324
319
pet := user .Pets [0 ]
325
320
pet .Toy = Toy {Name : "toy_nested_preload_" + strconv .Itoa (1 )}
@@ -434,7 +429,6 @@ func TestNestedPreloadWithNestedJoin(t *testing.T) {
434
429
}
435
430
436
431
func TestMergeNestedPreloadWithNestedJoin (t * testing.T ) {
437
- t .Skip ()
438
432
users := []User {
439
433
{
440
434
Name : "TestMergeNestedPreloadWithNestedJoin-1" ,
@@ -473,7 +467,7 @@ func TestMergeNestedPreloadWithNestedJoin(t *testing.T) {
473
467
err := sess .
474
468
Joins ("Manager" ).
475
469
Preload ("Manager.Tools" ).
476
- Where ("users. name Like ?" , "TestMergeNestedPreloadWithNestedJoin%" ).
470
+ Where ("\" users\" . \" name\" Like ?" , "TestMergeNestedPreloadWithNestedJoin%" ).
477
471
Find (& result ).Error
478
472
479
473
if err != nil {
@@ -541,7 +535,6 @@ func TestNestedPreloadWithPointerJoin(t *testing.T) {
541
535
}
542
536
543
537
func TestEmbedPreload (t * testing.T ) {
544
- t .Skip ()
545
538
type Country struct {
546
539
ID int `gorm:"primaryKey"`
547
540
Name string
@@ -666,7 +659,7 @@ func TestEmbedPreload(t *testing.T) {
666
659
for _ , test := range testList {
667
660
t .Run (test .name , func (t * testing.T ) {
668
661
actual := Org {}
669
- tx := DB .Where ("id = ?" , org .ID ).Session (& gorm.Session {})
662
+ tx := DB .Where ("\" id \" = ?" , org .ID ).Session (& gorm.Session {})
670
663
for name , args := range test .preloads {
671
664
tx = tx .Preload (name , args ... )
672
665
}
0 commit comments