diff options
author | Justin Wernick <justin@worthe-it.co.za> | 2023-04-08 19:41:37 +0200 |
---|---|---|
committer | Justin Wernick <justin@worthe-it.co.za> | 2023-04-08 19:41:37 +0200 |
commit | ff5e3b4dd718e622d81e02c50786c2ec3d5437ae (patch) | |
tree | 9de8bebab5d9d5875744d51f3176d9301fb68007 /tests | |
parent | c21d81998d3cf573a4b0333f81c22494906cb111 (diff) |
Fill in test for updating description on existing repo
This also isn't implemented yet. Naughty naughty.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cli.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/cli.rs b/tests/cli.rs index dfbb915..56461ad 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -322,3 +322,29 @@ fn can_set_the_description_on_a_repo_during_init() -> Result<()> { Ok(()) } + +#[test] +fn can_change_the_description_on_a_repo() -> Result<()> { + let mut c = spawn_interactive_process()?; + let user = get_username().unwrap(); + let repo_name = "my-personal-repo"; + let description = "A cool repo that does cool things"; + c.p.send_line(&format!("git-init {repo_name}"))?; + c.p.exp_string(&format!( + "Successfully created \"git/{user}/{repo_name}.git\"", + ))?; + c.p.send_line(&format!( + "set-description \"git/{user}/{repo_name}.git\" \"{description}\"" + ))?; + c.p.exp_string("Successfully updated description")?; + expect_prompt(&mut c.p)?; + expect_list_table( + &mut c, + &[( + format!("git/{user}/{repo_name}.git"), + description.to_owned(), + )], + )?; + + Ok(()) +} |