diff options
Diffstat (limited to 'testing/tests')
-rw-r--r-- | testing/tests/ext.rs | 12 | ||||
-rw-r--r-- | testing/tests/simple.rs | 7 |
2 files changed, 8 insertions, 11 deletions
diff --git a/testing/tests/ext.rs b/testing/tests/ext.rs index 5ed4e72..7a494fa 100644 --- a/testing/tests/ext.rs +++ b/testing/tests/ext.rs @@ -8,7 +8,7 @@ struct PathHtml; fn test_path_ext_html() { let t = PathHtml; assert_eq!(t.render().unwrap(), "foo.html"); - assert_eq!(t.extension(), Some("html")); + assert_eq!(PathHtml::EXTENSION, Some("html")); } #[derive(Template)] @@ -19,7 +19,7 @@ struct PathJinja; fn test_path_ext_jinja() { let t = PathJinja; assert_eq!(t.render().unwrap(), "foo.jinja"); - assert_eq!(t.extension(), Some("jinja")); + assert_eq!(PathJinja::EXTENSION, Some("jinja")); } #[derive(Template)] @@ -30,7 +30,7 @@ struct PathHtmlJinja; fn test_path_ext_html_jinja() { let t = PathHtmlJinja; assert_eq!(t.render().unwrap(), "foo.html.jinja"); - assert_eq!(t.extension(), Some("html")); + assert_eq!(PathHtmlJinja::EXTENSION, Some("html")); } #[derive(Template)] @@ -41,7 +41,7 @@ struct PathHtmlAndExtTxt; fn test_path_ext_html_and_ext_txt() { let t = PathHtmlAndExtTxt; assert_eq!(t.render().unwrap(), "foo.html"); - assert_eq!(t.extension(), Some("txt")); + assert_eq!(PathHtmlAndExtTxt::EXTENSION, Some("txt")); } #[derive(Template)] @@ -52,7 +52,7 @@ struct PathJinjaAndExtTxt; fn test_path_ext_jinja_and_ext_txt() { let t = PathJinjaAndExtTxt; assert_eq!(t.render().unwrap(), "foo.jinja"); - assert_eq!(t.extension(), Some("txt")); + assert_eq!(PathJinjaAndExtTxt::EXTENSION, Some("txt")); } #[derive(Template)] @@ -63,5 +63,5 @@ struct PathHtmlJinjaAndExtTxt; fn test_path_ext_html_jinja_and_ext_txt() { let t = PathHtmlJinjaAndExtTxt; assert_eq!(t.render().unwrap(), "foo.html.jinja"); - assert_eq!(t.extension(), Some("txt")); + assert_eq!(PathHtmlJinjaAndExtTxt::EXTENSION, Some("txt")); } diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs index e66485a..dcd324e 100644 --- a/testing/tests/simple.rs +++ b/testing/tests/simple.rs @@ -1,6 +1,6 @@ #![allow(clippy::blacklisted_name)] -use askama::{SizedTemplate, Template}; +use askama::Template; use std::collections::HashMap; @@ -26,10 +26,7 @@ fn test_variables() { Iñtërnâtiônàlizætiøn is important\n\ in vars too: Iñtërnâtiônàlizætiøn" ); - assert_eq!( - <VariablesTemplate as SizedTemplate>::extension(), - Some("html") - ); + assert_eq!(VariablesTemplate::EXTENSION, Some("html")); } #[derive(Template)] |