Skip to content

Commit

Permalink
Run tests for quickstart tutorial (LukeMathWalker#219)
Browse files Browse the repository at this point in the history
It slipped through in LukeMathWalker#217 because we were only checking for a
successful compilation rather than executing tests.
  • Loading branch information
LukeMathWalker authored Mar 24, 2024
1 parent b4747c8 commit 5be2a7f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doc_examples/quickstart/10-greet_test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async fn non_utf8_user_agent_is_rejected() {
assert_eq!(response.status().as_u16(), StatusCode::BAD_REQUEST.as_u16());
assert_eq!(
response.text().await.unwrap(),
"The `User-Agent` header value must be a valid UTF-8 string"
"The `User-Agent` header value can only use ASCII printable characters."
);
}
```
2 changes: 1 addition & 1 deletion doc_examples/quickstart/10.patch
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ index fb02807..eeb2652 100644
+ assert_eq!(response.status().as_u16(), StatusCode::BAD_REQUEST.as_u16());
+ assert_eq!(
+ response.text().await.unwrap(),
+ "The `User-Agent` header value must be a valid UTF-8 string"
+ "The `User-Agent` header value can only use ASCII printable characters."
+ );
+}
4 changes: 2 additions & 2 deletions doc_examples/quickstart/tutorial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ steps:
source_path: "server/tests/integration/greet.rs"
ranges: [ ".." ]
commands:
- command: "cargo px c"
- command: "cargo px t"
expected_outcome: "success"
- patch: "10.patch"
snippets:
- name: "greet_test"
source_path: "server/tests/integration/greet.rs"
ranges: [ "21.." ]
commands:
- command: "cargo px c"
- command: "cargo px t"
expected_outcome: "success"

0 comments on commit 5be2a7f

Please sign in to comment.