mirror of
https://github.com/wahyd4/loginsrv.git
synced 2026-08-09 04:46:29 +10:00
Merge pull request #76 from magikstm/Add-Test-In-Logging-1
Add a missing test in logger.go
This commit is contained in:
@@ -50,6 +50,12 @@ func Test_Logger_Set(t *testing.T) {
|
||||
a.Regexp(`^time.* level\=error msg\=oops foo\=bar.*`, b.String())
|
||||
}
|
||||
|
||||
func Test_Logger_Set_Invalid(t *testing.T) {
|
||||
err := Set("foo", true)
|
||||
a := assert.New(t)
|
||||
a.Equal(err.Error(), "not a valid logrus Level: \"foo\"")
|
||||
}
|
||||
|
||||
func Test_Logger_Call(t *testing.T) {
|
||||
a := assert.New(t)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user