From 7951c02445263333803fedd977be1870633a02b2 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Tue, 3 May 2022 00:32:36 +0100 Subject: [PATCH] [TEM #2] - Add sad path test --- src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 07da766..62a970e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -285,4 +285,14 @@ mod lib_tests { assert_eq!(actual_chapter_content, end_chapter_content); } + + #[test] + fn test_sad_path_invalid_file() { + let start_chapter_content = "{{#template footer.md}}"; + + let actual_chapter_content = + replace_template(start_chapter_content, &TestFileReader::default(), "", "", 0); + + assert_eq!(actual_chapter_content, start_chapter_content); + } } \ No newline at end of file