Skip to content

Commit

Permalink
Use a special text file for testing that the documentation server works.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaskrause committed Aug 4, 2023
1 parent b18cec4 commit 26f4344
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 41 deletions.
39 changes: 0 additions & 39 deletions build.rs

This file was deleted.

2 changes: 2 additions & 0 deletions docs/book/compile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This file is only included to make sure the automatic tests can be executed
whether the documentation has been compiled or not.
2 changes: 2 additions & 0 deletions docs/src/compile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This file is only included to make sure the automatic tests can be executed
whether the documentation has been compiled or not.
6 changes: 6 additions & 0 deletions docs/src/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This file is only included to make sure the automatic tests can be executed
whether the documentation has been compiled or not.

You can compile the documentation by installing mdBook and then executing

> mdbook docs/
9 changes: 7 additions & 2 deletions src/documentation_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,16 @@ mod tests {
use tower::util::ServiceExt;

#[tokio::test]
async fn index_found() {
async fn compile_instructions_found() {
let app = app().unwrap();

let response = app
.oneshot(Request::builder().uri("/").body(Body::empty()).unwrap())
.oneshot(
Request::builder()
.uri("/compile.txt")
.body(Body::empty())
.unwrap(),
)
.await
.unwrap();

Expand Down

0 comments on commit 26f4344

Please sign in to comment.