diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-11-26 07:48:30 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-11-26 12:26:47 +0000 |
| commit | a0593e3aa9b19b9ca3c3881cbe0d9d207fe46d2c (patch) | |
| tree | 3482e7c558eff09cc91604ad6ddcd02cf2c94699 /tests/ngit_login.rs | |
| parent | 1332c625b75fce616e06b415c99a068bc45c8210 (diff) | |
refactor: err msgs 'cannot' > 'failed to'
in nearly all cases 'cannot' was used when an action was tried and
failed. 'failed to' is strictly better because:
* just because the action didn't work that time doesnt mean it
cannot work
* it is better at drawing the users attention to a problem
Diffstat (limited to 'tests/ngit_login.rs')
| -rw-r--r-- | tests/ngit_login.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/ngit_login.rs b/tests/ngit_login.rs index c928cc4..4cfe4e6 100644 --- a/tests/ngit_login.rs +++ b/tests/ngit_login.rs | |||
| @@ -128,7 +128,7 @@ mod with_relays { | |||
| 128 | 128 | ||
| 129 | p.expect("searching for profile...\r\n")?; | 129 | p.expect("searching for profile...\r\n")?; |
| 130 | 130 | ||
| 131 | p.expect("cannot extract account name from account metadata...\r\n")?; | 131 | p.expect("failed to extract account name from account metadata...\r\n")?; |
| 132 | 132 | ||
| 133 | p.expect_end_with( | 133 | p.expect_end_with( |
| 134 | format!("logged in as {}\r\n", TEST_KEY_1_NPUB).as_str(), | 134 | format!("logged in as {}\r\n", TEST_KEY_1_NPUB).as_str(), |
| @@ -618,7 +618,7 @@ mod with_relays { | |||
| 618 | 618 | ||
| 619 | p.expect("searching for profile...\r\n")?; | 619 | p.expect("searching for profile...\r\n")?; |
| 620 | 620 | ||
| 621 | p.expect("cannot find profile...\r\n")?; | 621 | p.expect("failed to find profile...\r\n")?; |
| 622 | 622 | ||
| 623 | p.expect_end_with(format!("logged in as {TEST_KEY_1_NPUB}\r\n").as_str())?; | 623 | p.expect_end_with(format!("logged in as {TEST_KEY_1_NPUB}\r\n").as_str())?; |
| 624 | for p in [51, 52] { | 624 | for p in [51, 52] { |
| @@ -682,7 +682,7 @@ mod with_relays { | |||
| 682 | 682 | ||
| 683 | p.expect("searching for profile...\r\n")?; | 683 | p.expect("searching for profile...\r\n")?; |
| 684 | 684 | ||
| 685 | p.expect("cannot find your relay list. consider using another nostr client to create one to enhance your nostr experience.\r\n")?; | 685 | p.expect("failed to find your relay list. consider using another nostr client to create one to enhance your nostr experience.\r\n")?; |
| 686 | 686 | ||
| 687 | p.expect_end_with("logged in as fred\r\n")?; | 687 | p.expect_end_with("logged in as fred\r\n")?; |
| 688 | for p in [51, 52] { | 688 | for p in [51, 52] { |
| @@ -932,7 +932,7 @@ mod with_offline_flag { | |||
| 932 | p.expect_input(EXPECTED_NSEC_PROMPT)? | 932 | p.expect_input(EXPECTED_NSEC_PROMPT)? |
| 933 | // this behaviour is intentional. rejecting the response with dialoguer | 933 | // this behaviour is intentional. rejecting the response with dialoguer |
| 934 | // hides the original input from the user so they | 934 | // hides the original input from the user so they |
| 935 | // cannot see the mistake they made. | 935 | // failed to see the mistake they made. |
| 936 | .succeeds_with(TEST_INVALID_NSEC)?; | 936 | .succeeds_with(TEST_INVALID_NSEC)?; |
| 937 | 937 | ||
| 938 | p.expect_input(invalid_nsec_response)? | 938 | p.expect_input(invalid_nsec_response)? |