From 43a445963968dac7da190b56f7c89ac0ff1f6abd Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 17 Jul 2024 10:53:20 +0100 Subject: feat(login): use fetch to get user profile fetch automatically gets updates to logged in user profile / relays fetching without specifying repo pointers will just fetch user profiles so that can be used during login, if user profile isn't in cache login now uses fetch --- tests/login.rs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'tests/login.rs') diff --git a/tests/login.rs b/tests/login.rs index 4cc2dbe..3bcfbf9 100644 --- a/tests/login.rs +++ b/tests/login.rs @@ -73,7 +73,7 @@ mod with_relays { p.expect("saved login details to local git config\r\n")?; - p.expect("searching for profile and relay updates...\r\n")?; + p.expect("searching for profile...\r\n")?; p.expect_end_with("logged in as fred\r\n")?; for p in [51, 52] { @@ -113,7 +113,7 @@ mod with_relays { p.expect("saved login details to local git config\r\n")?; - p.expect("searching for profile and relay updates...\r\n")?; + p.expect("searching for profile...\r\n")?; p.expect("cannot extract account name from account metadata...\r\n")?; @@ -422,7 +422,7 @@ mod with_relays { p.expect("saved login details to local git config\r\n")?; - p.expect("searching for profile and relay updates...\r\n")?; + p.expect("searching for profile...\r\n")?; p.expect_end_with("logged in as fred\r\n")?; for p in [51, 52] { @@ -489,7 +489,7 @@ mod with_relays { ["login", "--password", TEST_PASSWORD], ); - p.expect("searching for profile and relay updates...\r\n")?; + p.expect("searching for profile...\r\n")?; p.expect_end_with("logged in as fred\r\n")?; for p in [51, 52] { @@ -551,7 +551,7 @@ mod with_relays { p.expect("saved login details to local git config\r\n")?; - p.expect("searching for profile and relay updates...\r\n")?; + p.expect("searching for profile...\r\n")?; p.expect_end_with("logged in as fred\r\n")?; for p in [51, 52] { @@ -602,9 +602,9 @@ mod with_relays { p.expect("saved login details to local git config\r\n")?; - p.expect("searching for profile and relay updates...\r\n")?; + p.expect("searching for profile...\r\n")?; - p.expect("cannot find your account metadata (name, etc) on relays\r\n")?; + p.expect("cannot find profile...\r\n")?; p.expect_end_with(format!("logged in as {TEST_KEY_1_NPUB}\r\n").as_str())?; for p in [51, 52] { @@ -665,7 +665,7 @@ mod with_relays { p.expect("saved login details to local git config\r\n")?; - p.expect("searching for profile and relay updates...\r\n")?; + p.expect("searching for profile...\r\n")?; p.expect("cannot find your relay list. consider using another nostr client to create one to enhance your nostr experience.\r\n")?; @@ -743,8 +743,6 @@ mod with_relays { ["login", "--password", TEST_PASSWORD], ); - p.expect("searching for profile and relay updates...\r\n")?; - p.expect_end_eventually_with("logged in as fred\r\n")?; Ok(()) @@ -790,7 +788,7 @@ mod with_relays { p.expect("saved login details to local git config\r\n")?; - p.expect("searching for profile and relay updates...\r\n")?; + p.expect("searching for profile...\r\n")?; p.expect_end_with("logged in as fred\r\n")?; for p in [51, 52, 53, 55] { -- cgit v1.2.3