github.com/volatiletech/authboss@v2.4.1+incompatible/defaults/defaults_test.go (about) 1 package defaults 2 3 import ( 4 "testing" 5 6 "github.com/volatiletech/authboss" 7 ) 8 9 func TestSetCore(t *testing.T) { 10 t.Parallel() 11 12 config := &authboss.Config{} 13 SetCore(config, false, false) 14 15 if config.Core.Logger == nil { 16 t.Error("logger should be set") 17 } 18 if config.Core.Router == nil { 19 t.Error("router should be set") 20 } 21 if config.Core.ErrorHandler == nil { 22 t.Error("error handler should be set") 23 } 24 if config.Core.Responder == nil { 25 t.Error("responder should be set") 26 } 27 if config.Core.Redirector == nil { 28 t.Error("redirector should be set") 29 } 30 if config.Core.BodyReader == nil { 31 t.Error("bodyreader should be set") 32 } 33 if config.Core.Mailer == nil { 34 t.Error("mailer should be set") 35 } 36 if config.Core.Logger == nil { 37 t.Error("logger should be set") 38 } 39 }