diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/tests/simple.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs index 6515146..61f5fa4 100644 --- a/testing/tests/simple.rs +++ b/testing/tests/simple.rs @@ -52,3 +52,17 @@ fn test_else() { let s = ElseTemplate { cond: false }; assert_eq!(s.render(), "false\n"); } + + +#[derive(Template)] +#[template(path = "elif.html")] +struct ElIfTemplate { + cond: bool, + check: bool, +} + +#[test] +fn test_elif() { + let s = ElIfTemplate { cond: false, check: true }; + assert_eq!(s.render(), "checked\n"); +} |