Skip to content

Commit ab08785

Browse files
Add test for contents of 404 file from 404.md
1 parent 81d5ff7 commit ab08785

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

tests/testsuite/renderer.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,3 +271,12 @@ fn render_404_default() {
271271
<p>This URL is invalid, sorry. Please use the navigation bar or search to continue.</p>
272272
"##]]);
273273
}
274+
275+
/// Render 404 with custom content provided in `404.md`.
276+
#[test]
277+
fn render_404_with_custom_content() {
278+
BookTest::from_dir("renderer/render_404/use_404_md").check_main_file(
279+
"book/404.html",
280+
str!["<p>I'm using contents in 404.md!</p>"],
281+
);
282+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
I'm using contents in 404.md!

tests/testsuite/renderer/render_404/use_404_md/src/SUMMARY.md

Whitespace-only changes.

0 commit comments

Comments
 (0)