Skip to content

Commit

Permalink
cargo fmt (#658)
Browse files Browse the repository at this point in the history
  • Loading branch information
maflcko authored Jun 14, 2024
1 parent f10ab52 commit 5540ad8
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions tests/repos_commit_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const REPO: &str = "some-repo";

#[tokio::test]
async fn should_return_list_of_commits() {
let repos_list_commits_json: Vec::<RepoCommit> =
let repos_list_commits_json: Vec<RepoCommit> =
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;
Expand All @@ -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 {:#?}",
Expand All @@ -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()
);
});
}

0 comments on commit 5540ad8

Please sign in to comment.