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

Function test_login_logout_flow_once

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

Source from the content-addressed store, hash-verified

815
816 #[test]
817 fn test_login_logout_flow_once() {
818 let mut t = ClientTester::default();
819 t.get_service().borrow_mut().add_mock_login(
820 "u1",
821 "p1",
822 Ok(LoginResponse { access_token: AccessToken::new("token 1"), motd: vec![] }),
823 );
824 assert!(!t.get_storage().borrow().mounted().contains_key("CLOUD"));
825 t.run(r#"LOGIN "u1", "p1": LOGOUT"#)
826 .expect_prints(["", " Unmounted CLOUD drive", " Good bye!", ""])
827 .check();
828 assert!(!t.get_storage().borrow().mounted().contains_key("CLOUD"));
829 }
830
831 #[test]
832 fn test_login_logout_flow_multiple() {

Callers

nothing calls this directly

Calls 5

add_mock_loginMethod · 0.80
get_serviceMethod · 0.80
checkMethod · 0.45
expect_printsMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected