Skip to content

Commit 81d5ff7

Browse files
Add test for default contents of 404 file
1 parent 477aa63 commit 81d5ff7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/testsuite/renderer.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,12 @@ fn legacy_relative_command_path() {
262262
})
263263
.check_file("book/output", "test");
264264
}
265+
266+
/// Render 404 defaults to standard content.
267+
#[test]
268+
fn render_404_default() {
269+
BookTest::from_dir("build/basic_build").check_main_file("book/404.html", str![[r##"
270+
<h1 id="document-not-found-404"><a class="header" href="#document-not-found-404">Document not found (404)</a></h1>
271+
<p>This URL is invalid, sorry. Please use the navigation bar or search to continue.</p>
272+
"##]]);
273+
}

0 commit comments

Comments
 (0)