Skip to content

Commit

Permalink
fix(handlers): serve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon committed Oct 13, 2023
1 parent bc721b6 commit a697a43
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions viz-handlers/src/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,15 @@ mod tests {

#[tokio::test]
async fn file() -> Result<()> {
let serve = File::new("src/serve/mod.rs");
let serve = File::new("src/serve.rs");

let mut req: Request = Request::default();
req.extensions_mut().insert(Arc::new(RouteInfo {
id: 2,
pattern: "/*".to_string(),
params: Into::<Params>::into(vec![("*1", "mod.rs")]),
params: Into::<Params>::into(vec![("*1", "serve.rs")]),
}));
*req.uri_mut() = "/mod.rs".parse().unwrap();
*req.uri_mut() = "/serve.rs".parse().unwrap();

let result = serve.call(req).await;

Expand All @@ -284,9 +284,9 @@ mod tests {
req.extensions_mut().insert(Arc::new(RouteInfo {
id: 2,
pattern: "/*".to_string(),
params: Into::<Params>::into(vec![("*1", "mod")]),
params: Into::<Params>::into(vec![("*1", "serve")]),
}));
*req.uri_mut() = "/mod".parse().unwrap();
*req.uri_mut() = "/serve".parse().unwrap();

let result = serve.call(req).await;

Expand Down

0 comments on commit a697a43

Please sign in to comment.