feat: harmony-cli v0.1 #8 #9
@@ -22,9 +22,17 @@ async fn main() {
|
||||
use assert_cmd::Command;
|
||||
|
||||
#[test]
|
||||
fn test_example() {
|
||||
fn test_example_success() {
|
||||
let mut cmd = Command::cargo_bin("example-cli").unwrap();
|
||||
let assert = cmd.arg("--run").arg("SuccessScore").assert();
|
||||
let assert = cmd.args(&["--run", "--filter", "SuccessScore"]).assert();
|
||||
|
||||
assert.success();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_example_fail() {
|
||||
let mut cmd_fail = Command::cargo_bin("example-cli").unwrap();
|
||||
let assert_fail = cmd_fail.args(&["--run", "--filter", "ErrorScore"]).assert();
|
||||
|
||||
assert_fail.failure();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user