github.com/mailru/activerecord@v1.12.2/pkg/activerecord/activerecord_w_test.go (about) 1 package activerecord 2 3 import ( 4 "testing" 5 ) 6 7 func TestInitActiveRecord(t *testing.T) { 8 type args struct { 9 opts []Option 10 } 11 tests := []struct { 12 name string 13 args args 14 }{ 15 { 16 name: "empty opts", 17 args: args{ 18 opts: []Option{}, 19 }, 20 }, 21 { 22 name: "with logger", 23 args: args{ 24 opts: []Option{ 25 WithLogger(NewLogger()), 26 }, 27 }, 28 }, 29 } 30 for _, tt := range tests { 31 t.Run(tt.name, func(t *testing.T) { 32 InitActiveRecord(tt.args.opts...) 33 }) 34 35 instance = nil 36 } 37 }