summaryrefslogtreecommitdiff
path: root/tests/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cli.rs')
-rw-r--r--tests/cli.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/cli.rs b/tests/cli.rs
index a4b36a9..4f8de2f 100644
--- a/tests/cli.rs
+++ b/tests/cli.rs
@@ -162,6 +162,17 @@ fn can_init_a_new_shared_git_repo() -> Result<()> {
}
#[test]
+fn does_not_init_shared_repo_if_the_user_isnt_in_the_group() -> Result<()> {
+ let mut c = spawn_interactive_process()?;
+ let group = "not-a-real-group";
+ let repo_name = "my-new-shared-repo";
+ c.p.send_line(&format!("git-init --group {} {}", group, repo_name))?;
+ c.p.exp_string("Unknown group")?;
+
+ Ok(())
+}
+
+#[test]
fn runs_a_single_command_and_exit_with_cli_flag() -> Result<()> {
let username = get_username().unwrap();
let repo_name = "another-new-repo";