diff options
Diffstat (limited to 'tests/send.rs')
| -rw-r--r-- | tests/send.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/send.rs b/tests/send.rs index b5c803d..58c21f9 100644 --- a/tests/send.rs +++ b/tests/send.rs | |||
| @@ -39,7 +39,7 @@ fn when_no_commits_ahead_of_main_return_error() -> Result<()> { | |||
| 39 | test_repo.checkout("feature")?; | 39 | test_repo.checkout("feature")?; |
| 40 | 40 | ||
| 41 | let mut p = CliTester::new_from_dir(&test_repo.dir, ["send"]); | 41 | let mut p = CliTester::new_from_dir(&test_repo.dir, ["send"]); |
| 42 | p.expect("Error: 'head' is 0 commits ahead of 'main' so no patches were created")?; | 42 | p.expect("Error: 'feature' is 0 commits ahead of 'main' so no patches were created")?; |
| 43 | Ok(()) | 43 | Ok(()) |
| 44 | } | 44 | } |
| 45 | 45 | ||
| @@ -73,7 +73,7 @@ mod when_commits_behind_ask_to_proceed { | |||
| 73 | ahead: u8, | 73 | ahead: u8, |
| 74 | ) -> Result<CliTesterConfirmPrompt> { | 74 | ) -> Result<CliTesterConfirmPrompt> { |
| 75 | p.expect_confirm( | 75 | p.expect_confirm( |
| 76 | format!("'head' is {behind} commits behind 'main' and {ahead} ahead. Consider rebasing before sending patches. Proceed anyway?").as_str(), | 76 | format!("'feature' is {behind} commits behind 'main' and {ahead} ahead. Consider rebasing before sending patches. Proceed anyway?").as_str(), |
| 77 | Some(false), | 77 | Some(false), |
| 78 | ) | 78 | ) |
| 79 | } | 79 | } |
| @@ -108,7 +108,7 @@ mod when_commits_behind_ask_to_proceed { | |||
| 108 | let mut p = CliTester::new_from_dir(&test_repo.dir, ["send"]); | 108 | let mut p = CliTester::new_from_dir(&test_repo.dir, ["send"]); |
| 109 | expect_confirm_prompt(&mut p, BEHIND_LEN, AHEAD_LEN)?.succeeds_with(Some(true))?; | 109 | expect_confirm_prompt(&mut p, BEHIND_LEN, AHEAD_LEN)?.succeeds_with(Some(true))?; |
| 110 | p.expect( | 110 | p.expect( |
| 111 | format!("creating patch for {AHEAD_LEN} commits from 'head' that are {BEHIND_LEN} behind 'main'",) | 111 | format!("creating patch for {AHEAD_LEN} commits from 'feature' that are {BEHIND_LEN} behind 'main'",) |
| 112 | .as_str(), | 112 | .as_str(), |
| 113 | )?; | 113 | )?; |
| 114 | p.exit()?; | 114 | p.exit()?; |
| @@ -131,7 +131,7 @@ fn cli_message_creating_patches() -> Result<()> { | |||
| 131 | 131 | ||
| 132 | let mut p = CliTester::new_from_dir(&test_repo.dir, ["send"]); | 132 | let mut p = CliTester::new_from_dir(&test_repo.dir, ["send"]); |
| 133 | 133 | ||
| 134 | p.expect("creating patch for 2 commits from 'head' that can be merged into 'main'")?; | 134 | p.expect("creating patch for 2 commits from 'feature' that can be merged into 'main'")?; |
| 135 | p.exit()?; | 135 | p.exit()?; |
| 136 | Ok(()) | 136 | Ok(()) |
| 137 | } | 137 | } |
| @@ -184,7 +184,7 @@ fn cli_tester_create_proposal(git_repo: &GitTestRepo, include_cover_letter: bool | |||
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | fn expect_msgs_first(p: &mut CliTester, include_cover_letter: bool) -> Result<()> { | 186 | fn expect_msgs_first(p: &mut CliTester, include_cover_letter: bool) -> Result<()> { |
| 187 | p.expect("creating patch for 2 commits from 'head' that can be merged into 'main'\r\n")?; | 187 | p.expect("creating patch for 2 commits from 'feature' that can be merged into 'main'\r\n")?; |
| 188 | p.expect("searching for profile and relay updates...\r\n")?; | 188 | p.expect("searching for profile and relay updates...\r\n")?; |
| 189 | p.expect("\r")?; | 189 | p.expect("\r")?; |
| 190 | p.expect("logged in as fred\r\n")?; | 190 | p.expect("logged in as fred\r\n")?; |