Skip to content

Commit

Permalink
update tests, fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Austionian committed Mar 25, 2024
1 parent 5dd8ab9 commit 87f76db
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 105 deletions.
132 changes: 38 additions & 94 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ comrak = "0.21"
config = { version = "0.14", default-features = false, features = ["yaml"] }
hyper = { version = "1", features = ["full"] }
lazy_static = "1"
reqwest = { version = "0.11", features = ["json"] }
reqwest = { version = "0.12", features = ["json"] }
serde = { version = "1", features = ["derive"] }
serde-aux = "4"
serde_json = "1"
Expand Down
2 changes: 1 addition & 1 deletion templates/includes/header.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Mobile nav -->
<div x-cloak>
<div x-cloak >
<div
class="h-screen w-screen z-10 px-6 fixed bg-white/20 dark:bg-black/20 backdrop-blur-lg md:hidden pt-32"
x-show="open"
Expand Down
2 changes: 1 addition & 1 deletion tests/api/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ mod blog;
mod health_check;
mod helpers;
mod post;
mod projects;
mod project;
mod root;
9 changes: 1 addition & 8 deletions tests/api/projects.rs → tests/api/project.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::helpers::start_test_app;

#[tokio::test]
async fn it_returns_the_projects_page_with_full_template() {
async fn it_returns_the_projects() {
let addr = start_test_app()
.await
.expect("Unable to start test server.");
Expand All @@ -11,11 +11,4 @@ async fn it_returns_the_projects_page_with_full_template() {
.unwrap();

assert_eq!(response.status().as_u16(), 200);

let body = response.text().await.unwrap();

// More than just a snippet is returned
assert!(body.contains("<!doctype html>"));
// Text from the footer.
assert!(body.contains("©"));
}

0 comments on commit 87f76db

Please sign in to comment.