File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -92,16 +92,13 @@ func TestSetAndGet(t *testing.T) {
9292 }
9393}
9494
95- func TestInsertScenarios (t * testing.T ) {
95+ func TesUserInsertScenarios (t * testing.T ) {
9696 type UserWithAge struct {
9797 ID uint `gorm:"column:ID;primaryKey"`
9898 Name string `gorm:"column:NAME"`
9999 Age int `gorm:"column:AGE"`
100100 }
101101
102- if err := DB .Migrator ().DropTable (& UserWithAge {}); err != nil {
103- t .Fatalf ("Failed to drop table: %v" , err )
104- }
105102 if err := DB .AutoMigrate (& UserWithAge {}); err != nil {
106103 t .Fatalf ("Failed to migrate table: %v" , err )
107104 }
@@ -126,7 +123,7 @@ func TestInsertScenarios(t *testing.T) {
126123 Name string `gorm:"column:NAME"`
127124 CreatedAt time.Time `gorm:"column:CREATED_AT"`
128125 }
129-
126+
130127 if err := DB .AutoMigrate (& UserWithTime {}); err != nil {
131128 t .Fatalf ("Failed to migrate UserWithTime table: %v" , err )
132129 }
Original file line number Diff line number Diff line change @@ -379,4 +379,4 @@ BenchmarkScanSlice
379379BenchmarkScanSlicePointer
380380BenchmarkUpdate
381381BenchmarkDelete
382- TestInsertScenarios
382+ TesUserInsertScenarios
You can’t perform that action at this time.
0 commit comments