mirror of
https://github.com/askama-rs/askama.git
synced 2025-10-02 07:20:55 +00:00
Add test for path::get_template_source()
This commit is contained in:
parent
21885c06bf
commit
05f11a6843
@ -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"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user