Add test for path::get_template_source()

This commit is contained in:
Dirkjan Ochtman 2017-08-06 14:48:55 +02:00
parent 21885c06bf
commit 05f11a6843

View File

@ -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"));