diff options
author | Justin Wernick <justin@worthe-it.co.za> | 2023-03-29 22:59:57 +0200 |
---|---|---|
committer | Justin Wernick <justin@worthe-it.co.za> | 2023-03-29 23:01:47 +0200 |
commit | 745cd8ab27480a3cf516a2684db2c4fd7cf2144c (patch) | |
tree | feb950d52c3289b5112b81e3d3d6a79f0c94cb49 /tests | |
parent | 87da80d972c00358b46172ec9661e6a3a307a0a5 (diff) |
Check user group when creating shared repos
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cli.rs | 11 |
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"; |