Skip to content

Commit

Permalink
feat(#197): tests
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Oct 9, 2024
1 parent 661bfc8 commit 270b8ca
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions cli/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,25 @@ mod tests {
Ok(())
}

#[tag("deep")]
#[test]
fn outputs_version() -> Result<()> {
let assertion = Command::cargo_bin("fakehub")?.arg("--version").assert();
let bytes = assertion.get_output().stdout.as_slice();
let output = str::from_utf8(bytes)?;
assert!(output.contains(env!("CARGO_PKG_VERSION")));
Ok(())
}

#[test]
fn outputs_version_from_short() -> Result<()> {
let assertion = Command::cargo_bin("fakehub")?.arg("-v").assert();
let bytes = assertion.get_output().stdout.as_slice();
let output = str::from_utf8(bytes)?;
assert!(output.contains(env!("CARGO_PKG_VERSION")));
Ok(())
}

#[tag("deep")]
#[test]
fn outputs_start_opts() -> Result<()> {
Expand Down

0 comments on commit 270b8ca

Please sign in to comment.