diff options
Diffstat (limited to 'log_test.go')
-rw-r--r-- | log_test.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/log_test.go b/log_test.go new file mode 100644 index 0000000..906c6dc --- /dev/null +++ b/log_test.go @@ -0,0 +1,21 @@ +package main + +import ( + "testing" + + log "github.com/sirupsen/logrus" +) + +func TestLogInfo(t *testing.T) { + logrusConstant := stringToLogConstant(":info") + if logrusConstant != log.InfoLevel { + t.Errorf("Wrong logrus constant for info") + } +} + +func TestLogInvalid(t *testing.T) { + logrusConstant := stringToLogConstant("ziz") + if logrusConstant != log.FatalLevel { + t.Errorf("Unknown strings should return fatal loglevel") + } +} |