From a9e4c6772a378fd28edbca9b9267d2e7d08bee2c Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 23 Feb 2024 12:25:11 +0000 Subject: fix(push): remove force push bug introduced in b931b37e26486e4e6d15f302e87141dcf2f596ba --- tests/send.rs | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'tests/send.rs') diff --git a/tests/send.rs b/tests/send.rs index 58c21f9..06f1b86 100644 --- a/tests/send.rs +++ b/tests/send.rs @@ -4,29 +4,11 @@ use serial_test::serial; use test_utils::{git::GitTestRepo, relay::Relay, *}; #[test] -fn when_to_branch_doesnt_exist_return_error() -> Result<()> { - let test_repo = GitTestRepo::default(); - test_repo.populate()?; - let mut p = CliTester::new_from_dir(&test_repo.dir, ["send", "--to-branch", "nonexistant"]); - p.expect("Error: cannot find to_branch 'nonexistant'")?; - Ok(()) -} - -#[test] -fn when_no_to_branch_specified_and_no_main_or_master_branch_return_error() -> Result<()> { +fn when_no_main_or_master_branch_return_error() -> Result<()> { let test_repo = GitTestRepo::new("notmain")?; test_repo.populate()?; let mut p = CliTester::new_from_dir(&test_repo.dir, ["send"]); - p.expect("Error: a destination branch (to_branch) is not specified and the defaults (main or master) do not exist")?; - Ok(()) -} - -#[test] -fn when_from_branch_doesnt_exist_return_error() -> Result<()> { - let test_repo = GitTestRepo::default(); - test_repo.populate()?; - let mut p = CliTester::new_from_dir(&test_repo.dir, ["send", "--from-branch", "nonexistant"]); - p.expect("Error: cannot find from_branch 'nonexistant'")?; + p.expect("Error: the default branches (main or master) do not exist")?; Ok(()) } -- cgit v1.2.3