summaryrefslogtreecommitdiff
path: root/tests/cli.rs
diff options
context:
space:
mode:
authorJustin Wernick <justin@worthe-it.co.za>2023-02-28 22:54:04 +0200
committerJustin Wernick <justin@worthe-it.co.za>2023-02-28 22:54:04 +0200
commitdb131014cf9d40f526a42d14901f3c10cba27786 (patch)
tree93eb9780269578641cf1ba93cfbe9f1abcd92ff4 /tests/cli.rs
parent54e3aa3422ae75fc9d69ceb9d09a8cd1a3e168ec (diff)
Git init
Diffstat (limited to 'tests/cli.rs')
-rw-r--r--tests/cli.rs11
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(())
}