From 05f11a6843b482176c32d758e0c4f676d33c16be Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sun, 6 Aug 2017 14:48:55 +0200 Subject: Add test for path::get_template_source() --- askama_derive/src/path.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/askama_derive/src/path.rs b/askama_derive/src/path.rs index 9431306..e48f7d7 100644 --- a/askama_derive/src/path.rs +++ b/askama_derive/src/path.rs @@ -51,9 +51,14 @@ pub fn get_template_source(tpl_file: &str) -> String { #[cfg(test)] mod tests { - use super::find_template_from_path; + use super::{find_template_from_path, get_template_source}; use super::Path; + #[test] + fn get_source() { + assert_eq!(get_template_source("sub/b.html"), "bar\n"); + } + #[test] fn find_absolute() { let path = find_template_from_path("sub/b.html", Some("a.html")); -- cgit