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

Function test_login_skip_motd_on_narrow_console

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

Source from the content-addressed store, hash-verified

669
670 #[test]
671 fn test_login_skip_motd_on_narrow_console() {
672 let mut t = ClientTester::default();
673 t.get_console().borrow_mut().set_size_chars(CharsXY::new(10, 0));
674 t.get_service().borrow_mut().add_mock_login(
675 "the-username",
676 "the-password",
677 Ok(LoginResponse {
678 access_token: AccessToken::new("random token"),
679 motd: vec!["first line".to_owned(), "second line".to_owned()],
680 }),
681 );
682 t.run(format!(r#"LOGIN "{}", "{}""#, "the-username", "the-password"))
683 .expect_access_token("random token")
684 .check();
685 }
686
687 #[test]
688 fn test_login_show_motd_on_wide_console() {

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected