upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/list.rs2
-rw-r--r--tests/push.rs2
-rw-r--r--tests/send.rs10
3 files changed, 6 insertions, 8 deletions
diff --git a/tests/list.rs b/tests/list.rs
index ff54586..b6bcd08 100644
--- a/tests/list.rs
+++ b/tests/list.rs
@@ -1710,8 +1710,6 @@ mod when_main_branch_is_uptodate {
1710 c.succeeds_with(0, true, None)?; 1710 c.succeeds_with(0, true, None)?;
1711 p.expect("finding commits...\r\n")?; 1711 p.expect("finding commits...\r\n")?;
1712 p.expect("updated proposal available (2 ahead 0 behind 'main'). existing version is 2 ahead 1 behind 'main'\r\n")?; 1712 p.expect("updated proposal available (2 ahead 0 behind 'main'). existing version is 2 ahead 1 behind 'main'\r\n")?;
1713 // its got here but tmpgit-32.. indicates that creatubg the eature
1714 // branch in line 1291 didnt work so the choices will be different
1715 let mut c = p.expect_choice( 1713 let mut c = p.expect_choice(
1716 "", 1714 "",
1717 vec![ 1715 vec![
diff --git a/tests/push.rs b/tests/push.rs
index 81daf0e..0705174 100644
--- a/tests/push.rs
+++ b/tests/push.rs
@@ -591,7 +591,7 @@ mod when_branch_is_checked_out {
591 p.expect("preparing to force push proposal revision...\r\n")?; 591 p.expect("preparing to force push proposal revision...\r\n")?;
592 592
593 // standard output from `ngit send` 593 // standard output from `ngit send`
594 p.expect("creating patch for 2 commits from 'head' that can be merged into 'main'\r\n")?; 594 p.expect(format!("creating patch for 2 commits from '{FEATURE_BRANCH_NAME_1}' that can be merged into 'main'\r\n"))?;
595 p.expect("searching for profile and relay updates...\r\n")?; 595 p.expect("searching for profile and relay updates...\r\n")?;
596 p.expect("\r")?; 596 p.expect("\r")?;
597 p.expect("logged in as fred\r\n")?; 597 p.expect("logged in as fred\r\n")?;
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
186fn expect_msgs_first(p: &mut CliTester, include_cover_letter: bool) -> Result<()> { 186fn 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")?;