Skip to content

Commit 1d1d4d7

Browse files
committed
Update tests to handle added dummy_book chapter
1 parent fd9d27e commit 1d1d4d7

File tree

2 files changed

+584
-158
lines changed

2 files changed

+584
-158
lines changed

tests/rendered_output.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const TOC_TOP_LEVEL: &[&'static str] = &[
2727
"1. First Chapter",
2828
"2. Second Chapter",
2929
"Conclusion",
30+
"Dummy Book",
3031
"Introduction",
3132
];
3233
const TOC_SECOND_LEVEL: &[&'static str] =
@@ -126,7 +127,8 @@ fn rendered_code_has_playpen_stuff() {
126127
#[test]
127128
fn chapter_content_appears_in_rendered_document() {
128129
let content = vec![
129-
("index.html", "Here's some interesting text"),
130+
("index.html", "This file is just here to cause the"),
131+
("intro.html", "Here's some interesting text"),
130132
("second.html", "Second Chapter"),
131133
("first/nested.html", "testable code"),
132134
("first/index.html", "more text"),
@@ -437,7 +439,7 @@ mod search {
437439
assert_eq!(docs[&some_section]["body"], "");
438440
assert_eq!(
439441
docs[&summary]["body"],
440-
"Introduction First Chapter Nested Chapter Includes Recursive Second Chapter Conclusion"
442+
"Dummy Book Introduction First Chapter Nested Chapter Includes Recursive Second Chapter Conclusion"
441443
);
442444
assert_eq!(docs[&summary]["breadcrumbs"], "First Chapter » Summary");
443445
assert_eq!(docs[&conclusion]["body"], "I put <HTML> in here!");

0 commit comments

Comments
 (0)