File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ func TestJoinWithSoftDeleted(t *testing.T) {
259259
260260 var user1 User
261261 DB .Model (& User {}).Joins ("NamedPet" ).Joins ("Account" ).First (& user1 , user .ID )
262- if user1 .NamedPet == nil || user1 .Account .ID == 0 {
262+ if user1 .NamedPet . ID == 0 || user1 .Account .ID == 0 {
263263 t .Fatalf ("joins NamedPet and Account should not empty:%v" , user1 )
264264 }
265265
@@ -268,17 +268,17 @@ func TestJoinWithSoftDeleted(t *testing.T) {
268268
269269 var user2 User
270270 DB .Model (& User {}).Joins ("NamedPet" ).Joins ("Account" ).First (& user2 , user .ID )
271- if user2 .NamedPet == nil || user2 .Account .ID != 0 {
272- t .Fatalf ("joins Account should not empty:%v" , user2 )
271+ if user2 .NamedPet . ID == 0 || user2 .Account .ID != 0 {
272+ t .Fatalf ("joins Account should be empty:%v" , user2 )
273273 }
274274
275275 // NamedPet should empty
276276 DB .Delete (& user1 .NamedPet )
277277
278278 var user3 User
279279 DB .Model (& User {}).Joins ("NamedPet" ).Joins ("Account" ).First (& user3 , user .ID )
280- if user3 .NamedPet != nil || user2 .Account .ID != 0 {
281- t .Fatalf ("joins NamedPet and Account should not empty:%v" , user2 )
280+ if user3 .NamedPet . ID != 0 || user3 .Account .ID != 0 {
281+ t .Fatalf ("joins NamedPet and Account should be empty:%v" , user3 )
282282 }
283283}
284284
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ TestCreateWithAutoIncrementCompositeKey
6868TestCreateOnConflictWithDefaultNull
6969TestCreateFromMapWithoutPK
7070TestCreateFromMapWithTable
71- # TestCustomizeColumn
71+ TestCustomizeColumn
7272TestCustomColumnAndIgnoredFieldClash
7373TestCustomizeField
7474TestDefaultValue
@@ -142,7 +142,7 @@ TestJoinOn
142142TestJoinsWithSelect
143143TestJoinWithOmit
144144TestJoinCount
145- # TestJoinWithSoftDeleted
145+ TestJoinWithSoftDeleted
146146TestInnerJoins
147147TestJoinWithSameColumnName
148148TestJoinArgsWithDB
You can’t perform that action at this time.
0 commit comments