Skip to content

Commit 041a055

Browse files
committed
Add test for the null model
Signed-off-by: Dmitry Sulman <[email protected]>
1 parent fa1dc36 commit 041a055

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

logback-access-reactor-netty-spring-boot-starter/src/test/kotlin/io/github/dmitrysulman/logback/access/reactor/netty/joran/LogbackAccessSpringProfileWithinSecondPhaseElementSanityCheckerTests.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@ import io.github.dmitrysulman.logback.access.reactor.netty.ReactorNettyAccessLog
44
import io.github.dmitrysulman.logback.access.reactor.netty.autoconfigure.ReactorNettyAccessLogFactoryAutoConfiguration
55
import io.kotest.matchers.booleans.shouldBeTrue
66
import org.junit.jupiter.api.Test
7+
import org.junit.jupiter.api.assertDoesNotThrow
78
import org.springframework.beans.factory.getBean
89
import org.springframework.boot.autoconfigure.AutoConfigurations
910
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner
1011

1112
class LogbackAccessSpringProfileWithinSecondPhaseElementSanityCheckerTests {
13+
@Test
14+
fun `should not fail when model is null`() {
15+
val sanityChecker = LogbackAccessSpringProfileWithinSecondPhaseElementSanityChecker()
16+
assertDoesNotThrow { sanityChecker.check(null) }
17+
}
18+
1219
@Test
1320
fun `should add warning status on nested springProfile element within appender element`() {
1421
ReactiveWebApplicationContextRunner()

0 commit comments

Comments
 (0)