Skip to content

Commit

Permalink
add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kkumar-gcc committed Apr 30, 2024
1 parent 2c71b79 commit 49744a3
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions log/logrus_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,24 @@ func TestLogrus(t *testing.T) {
assert.True(t, file.Contain(dailyLog, "test.info: Goravel\ntrace:"))
},
},
{
name: "Conjugate method calls",
setup: func() {
mockDriverConfig(mockConfig)

log = NewApplication(mockConfig)
log.Error("test error")
log.Info("test info")
},
assert: func() {
assert.True(t, file.Contain(singleLog, "test.error: test error\ntrace:"))
assert.True(t, file.Contain(singleLog, "test.info: test info"))
assert.False(t, file.Contain(dailyLog, "test.info: test info\ntrace:"))
assert.True(t, file.Contain(dailyLog, "test.error: test error"))
assert.True(t, file.Contain(dailyLog, "test.info: test info"))
assert.False(t, file.Contain(singleLog, "test.info: test info\ntrace:"))
},
},
}

for _, test := range tests {
Expand Down

0 comments on commit 49744a3

Please sign in to comment.