From db131014cf9d40f526a42d14901f3c10cba27786 Mon Sep 17 00:00:00 2001 From: Justin Wernick Date: Tue, 28 Feb 2023 22:54:04 +0200 Subject: Git init --- tests/cli.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tests') 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 { @@ -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(()) } -- cgit v1.2.3