diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-06-28 17:12:21 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-06-28 17:12:21 +0100 |
| commit | 397080d94d8efdf2df95a1dc8dc82d4d7070028d (patch) | |
| tree | 41146a6de506f405df956351208ccc41bf7ad1ff /tests | |
| parent | 80599528e2a613791130dc59bcf346e223b6a30d (diff) | |
feat(login): login with nostr address via nip46
currently using patched version of rust-nostr with function to fetch
nip46 relays from nip05 providers. this patch has been merged so it
will make it into the next rust-nostr release.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/login.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/login.rs b/tests/login.rs index 9da2a0e..4cc2dbe 100644 --- a/tests/login.rs +++ b/tests/login.rs | |||
| @@ -3,7 +3,7 @@ use git::GitTestRepo; | |||
| 3 | use serial_test::serial; | 3 | use serial_test::serial; |
| 4 | use test_utils::*; | 4 | use test_utils::*; |
| 5 | 5 | ||
| 6 | static EXPECTED_NSEC_PROMPT: &str = "login with bunker uri / nsec"; | 6 | static EXPECTED_NSEC_PROMPT: &str = "login with nostr address / nsec"; |
| 7 | static EXPECTED_LOCAL_REPOSITORY_PROMPT: &str = "just for this repository?"; | 7 | static EXPECTED_LOCAL_REPOSITORY_PROMPT: &str = "just for this repository?"; |
| 8 | static EXPECTED_REQUIRE_PASSWORD_PROMPT: &str = "require password?"; | 8 | static EXPECTED_REQUIRE_PASSWORD_PROMPT: &str = "require password?"; |
| 9 | static EXPECTED_SET_PASSWORD_PROMPT: &str = "encrypt with password"; | 9 | static EXPECTED_SET_PASSWORD_PROMPT: &str = "encrypt with password"; |
| @@ -909,7 +909,8 @@ mod with_offline_flag { | |||
| 909 | 909 | ||
| 910 | #[test] | 910 | #[test] |
| 911 | fn prompts_for_nsec_until_valid() -> Result<()> { | 911 | fn prompts_for_nsec_until_valid() -> Result<()> { |
| 912 | let invalid_nsec_response = "invalid. try again with nostr address / nsec"; | 912 | let invalid_nsec_response = |
| 913 | "invalid. try again with nostr address / bunker uri / nsec"; | ||
| 913 | 914 | ||
| 914 | let test_repo = GitTestRepo::default(); | 915 | let test_repo = GitTestRepo::default(); |
| 915 | let mut p = CliTester::new_from_dir(&test_repo.dir, ["login", "--offline"]); | 916 | let mut p = CliTester::new_from_dir(&test_repo.dir, ["login", "--offline"]); |