Add test for rebuild after deletion
This commit is contained in:
parent
a465d6a61e
commit
9a99b40216
|
@ -234,3 +234,15 @@ fn can_rebuild_after_renaming_non_md_asset_in_colocated_folder() {
|
|||
let res = after_content_rename(&mut site, &old_path, &new_path);
|
||||
assert!(res.is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn can_rebuild_after_deleting_file() {
|
||||
let tmp_dir = tempdir().expect("create temp dir");
|
||||
let (site_path, mut site) = load_and_build_site!(tmp_dir);
|
||||
let path = site_path.join("content").join("posts").join("fixed-slug.md");
|
||||
fs::remove_file(&path).unwrap();
|
||||
|
||||
let res = after_content_change(&mut site, &path);
|
||||
println!("{:?}", res);
|
||||
assert!(res.is_ok());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue