Skip to content

Commit

Permalink
fix: test_add_delete_config_passes
Browse files Browse the repository at this point in the history
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
  • Loading branch information
simonsan committed Jan 26, 2024
1 parent 78ab5a7 commit f72629e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/handlers/file_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ mod test {
// ADD CONFIG
// -----------------------
let test_vec = "Fancy Config Content".to_string();
let uri = ["/", &repo, "/index/config"].concat();
let uri = ["/", &repo, "/config"].concat();
let body = Body::new(test_vec.clone());

let app = Router::new()
Expand All @@ -230,7 +230,7 @@ mod test {
let resp = app.oneshot(request).await.unwrap();

assert_eq!(resp.status(), StatusCode::OK);
let conf_pth = path.join("index").join("config");
let conf_pth = path.join("config");
assert!(conf_pth.exists());
let conf_str = fs::read_to_string(conf_pth).unwrap();
assert_eq!(&conf_str, &test_vec);
Expand Down Expand Up @@ -275,7 +275,7 @@ mod test {
let resp = app.oneshot(request).await.unwrap();

assert_eq!(resp.status(), StatusCode::OK);
let conf_pth = path.join("data").join("config");
let conf_pth = path.join("config");
assert!(!conf_pth.exists());

// -----------------------
Expand All @@ -286,7 +286,7 @@ mod test {
.typed_delete(delete_repository::<RepositoryPath>)
.layer(middleware::from_fn(print_request_response));

let request = request_uri_for_test(&repo_name_uri, Method::POST);
let request = request_uri_for_test(&repo_name_uri, Method::DELETE);
let resp = app.oneshot(request).await.unwrap();

assert_eq!(resp.status(), StatusCode::OK);
Expand Down

0 comments on commit f72629e

Please sign in to comment.