Skip to content

Commit eb02e3e

Browse files
committed
Enable tests that are passed
1 parent 643b1d0 commit eb02e3e

File tree

5 files changed

+2
-17
lines changed

5 files changed

+2
-17
lines changed

tests/create_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ func TestCreateFromMap(t *testing.T) {
181181
}
182182

183183
func TestCreateWithAssociations(t *testing.T) {
184-
t.Skip()
185184
user := *GetUser("create_with_associations", Config{
186185
Account: true,
187186
Pets: 2,
@@ -200,7 +199,7 @@ func TestCreateWithAssociations(t *testing.T) {
200199
CheckUser(t, user, user)
201200

202201
var user2 User
203-
DB.Preload("Account").Preload("Pets").Preload("Toys").Preload("Company").Preload("Manager").Preload("Team").Preload("Languages").Preload("Friends").Find(&user2, "id = ?", user.ID)
202+
DB.Preload("Account").Preload("Pets").Preload("Toys").Preload("Company").Preload("Manager").Preload("Team").Preload("Languages").Preload("Friends").Find(&user2, "\"id\" = ?", user.ID)
204203
CheckUser(t, user2, user)
205204
}
206205

@@ -265,7 +264,6 @@ func TestBulkCreatePtrDataWithAssociations(t *testing.T) {
265264
}
266265

267266
func TestPolymorphicHasOne(t *testing.T) {
268-
t.Skip()
269267
t.Run("Struct", func(t *testing.T) {
270268
pet := Pet{
271269
Name: "PolymorphicHasOne",
@@ -279,7 +277,7 @@ func TestPolymorphicHasOne(t *testing.T) {
279277
CheckPet(t, pet, pet)
280278

281279
var pet2 Pet
282-
DB.Preload("Toy").Find(&pet2, "id = ?", pet.ID)
280+
DB.Preload("Toy").Find(&pet2, "\"id\" = ?", pet.ID)
283281
CheckPet(t, pet2, pet)
284282
})
285283

tests/generics_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ import (
5656
)
5757

5858
func TestGenericsCreate(t *testing.T) {
59-
t.Skip()
6059
ctx := context.Background()
6160

6261
user := User{Name: "TestGenericsCreate", Age: 18}

tests/joins_test.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ import (
5252
)
5353

5454
func TestJoins(t *testing.T) {
55-
t.Skip()
5655
user := *GetUser("joins-1", Config{Company: true, Manager: true, Account: true, NamedPet: false})
5756

5857
DB.Create(&user)
@@ -66,7 +65,6 @@ func TestJoins(t *testing.T) {
6665
}
6766

6867
func TestJoinsForSlice(t *testing.T) {
69-
t.Skip()
7068
users := []User{
7169
*GetUser("slice-joins-1", Config{Company: true, Manager: true, Account: true}),
7270
*GetUser("slice-joins-2", Config{Company: true, Manager: true, Account: true}),
@@ -101,8 +99,6 @@ func TestJoinsForSlice(t *testing.T) {
10199
}
102100

103101
func TestJoinConds(t *testing.T) {
104-
t.Skip()
105-
106102
user := *GetUser("joins-conds", Config{Account: true, Pets: 3})
107103
DB.Save(&user)
108104

@@ -157,8 +153,6 @@ func TestJoinConds(t *testing.T) {
157153
}
158154

159155
func TestJoinOn(t *testing.T) {
160-
t.Skip()
161-
162156
user := *GetUser("joins-on", Config{Pets: 2})
163157
DB.Save(&user)
164158

@@ -281,8 +275,6 @@ func TestJoinWithSoftDeleted(t *testing.T) {
281275
}
282276

283277
func TestInnerJoins(t *testing.T) {
284-
t.Skip()
285-
286278
user := *GetUser("inner-joins-1", Config{Company: true, Manager: true, Account: true, NamedPet: false})
287279

288280
DB.Create(&user)
@@ -336,8 +328,6 @@ func TestJoinWithSameColumnName(t *testing.T) {
336328
}
337329

338330
func TestJoinArgsWithDB(t *testing.T) {
339-
t.Skip()
340-
341331
user := *GetUser("joins-args-db", Config{Pets: 2})
342332
DB.Save(&user)
343333

tests/scan_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ func TestScanRowsNullValuesScanToFieldDefault(t *testing.T) {
303303
}
304304

305305
func TestScanToEmbedded(t *testing.T) {
306-
t.Skip()
307306
person1 := Person{Name: "person 1"}
308307
person2 := Person{Name: "person 2"}
309308
DB.Save(&person1).Save(&person2)

tests/update_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,6 @@ func TestBatchUpdateSlice(t *testing.T) {
10291029
}
10301030
}
10311031
func TestMixedSaveBatch(t *testing.T) {
1032-
t.Skip()
10331032
users := []*User{
10341033
GetUser("existing1", Config{}),
10351034
GetUser("existing2", Config{}),

0 commit comments

Comments
 (0)