MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_login_ok_with_password

Function test_login_ok_with_password

client/src/cmds.rs:627–639  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

625
626 #[test]
627 fn test_login_ok_with_password() {
628 let mut t = ClientTester::default();
629 t.get_service().borrow_mut().add_mock_login(
630 "the-username",
631 "the-password",
632 Ok(LoginResponse { access_token: AccessToken::new("random token"), motd: vec![] }),
633 );
634 assert!(!t.get_storage().borrow().mounted().contains_key("CLOUD"));
635 t.run(format!(r#"LOGIN "{}", "{}""#, "the-username", "the-password"))
636 .expect_access_token("random token")
637 .check();
638 assert!(t.get_storage().borrow().mounted().contains_key("CLOUD"));
639 }
640
641 #[test]
642 fn test_login_ok_ask_password() {

Callers

nothing calls this directly

Calls 5

add_mock_loginMethod · 0.80
get_serviceMethod · 0.80
expect_access_tokenMethod · 0.80
checkMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected