refactor: Refactored all cli tests to use purpose-built assertions

This commit is contained in:
2025-12-08 17:07:31 -07:00
parent ee1bee22eb
commit b807904c6c
22 changed files with 786 additions and 596 deletions
@@ -36,7 +36,7 @@ mod tests {
"1",
]);
assert!(result.is_err());
assert_err!(&result);
assert_eq!(
result.unwrap_err().kind(),
ErrorKind::MissingRequiredArgument
@@ -54,7 +54,7 @@ mod tests {
"1",
]);
assert!(result.is_err());
assert_err!(&result);
assert_eq!(
result.unwrap_err().kind(),
ErrorKind::MissingRequiredArgument
@@ -74,7 +74,7 @@ mod tests {
"1",
]);
assert!(result.is_ok());
assert_ok!(&result);
}
#[test]
@@ -82,7 +82,7 @@ mod tests {
let result =
Cli::command().try_get_matches_from(["managarr", "sonarr", "manual-search", "episode"]);
assert!(result.is_err());
assert_err!(&result);
assert_eq!(
result.unwrap_err().kind(),
ErrorKind::MissingRequiredArgument
@@ -100,7 +100,7 @@ mod tests {
"1",
]);
assert!(result.is_ok());
assert_ok!(&result);
}
}
@@ -149,7 +149,7 @@ mod tests {
.handle()
.await;
assert!(result.is_ok());
assert_ok!(&result);
}
#[tokio::test]
@@ -182,7 +182,7 @@ mod tests {
.handle()
.await;
assert!(result.is_ok());
assert_ok!(&result);
}
}
}