diff --git a/nlog/writer_test.go b/nlog/writer_test.go index 51b1b4c..7942284 100644 --- a/nlog/writer_test.go +++ b/nlog/writer_test.go @@ -97,6 +97,15 @@ func TestConsoleWriter(t *testing.T) { w.(*concreteWriter).statLog = easyToCloseWriter{} } +func TestNewFileWriter(t *testing.T) { + t.Run("access", func(t *testing.T) { + _, err := newFileWriter(LogConf{ + Path: "/not-exists", + }) + assert.Error(t, err) + }) +} + func TestNopWriter(t *testing.T) { assert.NotPanics(t, func() { var w nopWriter