From af8ebaf9149bd0f29da5dc6d4e87d5fc41b8855a Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 13 Jun 2024 17:44:46 +0200 Subject: [PATCH] cargo fmt --- tests/repos_commit_test.rs | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/tests/repos_commit_test.rs b/tests/repos_commit_test.rs index 8e7b1c52..aa240436 100644 --- a/tests/repos_commit_test.rs +++ b/tests/repos_commit_test.rs @@ -36,7 +36,7 @@ const REPO: &str = "some-repo"; #[tokio::test] async fn should_return_list_of_commits() { - let repos_list_commits_json: Vec:: = + let repos_list_commits_json: Vec = serde_json::from_str(include_str!("resources/repos_list_commits.json")).unwrap(); let template = ResponseTemplate::new(201).set_body_json(&repos_list_commits_json); let mock_server = setup_repos_commits_api(template).await; @@ -56,7 +56,7 @@ async fn should_return_list_of_commits() { let result = result.unwrap(); let result = result.items; - + assert!( result.len() == 1, "expected '1' for len(), got {:#?}", @@ -72,9 +72,24 @@ async fn should_return_list_of_commits() { ); assert!( - commit.commit.author.as_ref().unwrap().date.unwrap().to_rfc3339() == "2024-04-30T08:54:10+00:00", + commit + .commit + .author + .as_ref() + .unwrap() + .date + .unwrap() + .to_rfc3339() + == "2024-04-30T08:54:10+00:00", "expected '2024-04-30T08:54:10+00:00' value, got {:#?}", - commit.commit.author.as_ref().unwrap().date.unwrap().to_rfc3339() + commit + .commit + .author + .as_ref() + .unwrap() + .date + .unwrap() + .to_rfc3339() ); }); }