diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cli.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/cli.rs b/tests/cli.rs index fcf38e8..8b8aa82 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use assert_cmd::cargo::cargo_bin; +use assert_cmd::{cargo::cargo_bin, Command}; use rexpect::{session::PtySession, spawn}; fn spawn_interactive_process() -> Result<PtySession> { @@ -70,6 +70,13 @@ fn can_init_a_new_git_repo() -> Result<()> { p.send_line("git-init my-new-repo")?; p.exp_string("Successfully created my-new-repo.git")?; expect_prompt(&mut p)?; - // TODO: assert that the repo is actually there? + + Command::new("git") + .arg("rev-list") + .arg("--all") + .current_dir("git/my-new-repo.git") + .assert() + .success() + .stdout(""); Ok(()) } |