Skip to content

Commit

Permalink
Update tests to handle added dummy_book chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
mattico committed Jul 25, 2018
1 parent fd9d27e commit 1d1d4d7
Show file tree
Hide file tree
Showing 2 changed files with 584 additions and 158 deletions.
6 changes: 4 additions & 2 deletions tests/rendered_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const TOC_TOP_LEVEL: &[&'static str] = &[
"1. First Chapter",
"2. Second Chapter",
"Conclusion",
"Dummy Book",
"Introduction",
];
const TOC_SECOND_LEVEL: &[&'static str] =
Expand Down Expand Up @@ -126,7 +127,8 @@ fn rendered_code_has_playpen_stuff() {
#[test]
fn chapter_content_appears_in_rendered_document() {
let content = vec![
("index.html", "Here's some interesting text"),
("index.html", "This file is just here to cause the"),
("intro.html", "Here's some interesting text"),
("second.html", "Second Chapter"),
("first/nested.html", "testable code"),
("first/index.html", "more text"),
Expand Down Expand Up @@ -437,7 +439,7 @@ mod search {
assert_eq!(docs[&some_section]["body"], "");
assert_eq!(
docs[&summary]["body"],
"Introduction First Chapter Nested Chapter Includes Recursive Second Chapter Conclusion"
"Dummy Book Introduction First Chapter Nested Chapter Includes Recursive Second Chapter Conclusion"
);
assert_eq!(docs[&summary]["breadcrumbs"], "First Chapter » Summary");
assert_eq!(docs[&conclusion]["body"], "I put <HTML> in here!");
Expand Down
Loading

0 comments on commit 1d1d4d7

Please sign in to comment.