Skip to content

Commit

Permalink
designator order lol
Browse files Browse the repository at this point in the history
  • Loading branch information
dhconnelly committed Nov 22, 2024
1 parent 42dfe0b commit 3f6097b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/http/router_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ struct SimpleResponseWriter : public http::ResponseWriter {
};

TEST(Router, NoRoutesReturnsNotFound) {
Request req{.addr = "1.2.3.4", .params = {}, .path = "/"};
Request req{.addr = "1.2.3.4", .path = "/"};
SimpleResponseWriter resp;
auto handler = Router::builder().build();
handler(req, resp);
EXPECT_EQ(StatusCode::NotFound, resp.code);
}

TEST(Router, NoMatchesReturnsNotFound) {
Request req{.addr = "1.2.3.4", .params = {}, .path = "/"};
Request req{.addr = "1.2.3.4", .path = "/"};
SimpleResponseWriter resp;
auto handler = Router::builder()
.route("/foo", ErrorHandler)
Expand All @@ -53,7 +53,7 @@ TEST(Router, NoMatchesReturnsNotFound) {
}

TEST(Router, FirstMatchOnlyHandled) {
Request req{.addr = "1.2.3.4", .params = {}, .path = "/foo/bar/baz"};
Request req{.addr = "1.2.3.4", .path = "/foo/bar/baz"};
SimpleResponseWriter resp;
auto handler = Router::builder()
.route("/foo/baz", ErrorHandler)
Expand Down

0 comments on commit 3f6097b

Please sign in to comment.