From 7ef8b06cb40757138ab81f03d20e0ebb2ca73da6 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Wed, 22 Apr 2015 14:28:50 +0800 Subject: [PATCH] Fix tests with mysql --- preload_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/preload_test.go b/preload_test.go index 2929392c..7fbba5c0 100644 --- a/preload_test.go +++ b/preload_test.go @@ -104,6 +104,7 @@ func TestNestedPreload1(t *testing.T) { } Level3 struct { ID uint + Name string Level2 Level2 } ) @@ -143,6 +144,7 @@ func TestNestedPreload2(t *testing.T) { } Level3 struct { ID uint + Name string Level2s []Level2 } ) @@ -154,6 +156,7 @@ func TestNestedPreload2(t *testing.T) { } want := Level3{ + Name: "name", Level2s: []Level2{ { Level1s: []*Level1{ @@ -195,6 +198,7 @@ func TestNestedPreload3(t *testing.T) { Level3ID uint } Level3 struct { + Name string ID uint Level2s []Level2 } @@ -207,6 +211,7 @@ func TestNestedPreload3(t *testing.T) { } want := Level3{ + Name: "name", Level2s: []Level2{ {Level1: Level1{Value: "value1"}}, {Level1: Level1{Value: "value2"}}, @@ -240,6 +245,7 @@ func TestNestedPreload4(t *testing.T) { } Level3 struct { ID uint + Name string Level2 Level2 } ) @@ -287,6 +293,7 @@ func TestNestedPreload5(t *testing.T) { } Level3 struct { ID uint + Name string Level2 Level2 } ) @@ -331,6 +338,7 @@ func TestNestedPreload6(t *testing.T) { } Level3 struct { ID uint + Name string Level2s []Level2 } ) @@ -403,6 +411,7 @@ func TestNestedPreload7(t *testing.T) { } Level3 struct { ID uint + Name string Level2s []Level2 } ) @@ -457,6 +466,7 @@ func TestNestedPreload8(t *testing.T) { } Level3 struct { ID uint + Name string Level2 Level2 } ) @@ -527,6 +537,7 @@ func TestNestedPreload9(t *testing.T) { } Level3 struct { ID uint + Name string Level2 Level2 Level2_1 Level2_1 }