()
| 686 | |
| 687 | #[test] |
| 688 | fn test_login_show_motd_on_wide_console() { |
| 689 | let mut t = ClientTester::default(); |
| 690 | t.get_service().borrow_mut().add_mock_login( |
| 691 | "the-username", |
| 692 | "the-password", |
| 693 | Ok(LoginResponse { |
| 694 | access_token: AccessToken::new("random token"), |
| 695 | motd: vec!["first line".to_owned(), "second line".to_owned()], |
| 696 | }), |
| 697 | ); |
| 698 | t.run(format!(r#"LOGIN "{}", "{}""#, "the-username", "the-password")) |
| 699 | .expect_prints([ |
| 700 | "", |
| 701 | "----- BEGIN SERVER MOTD -----", |
| 702 | "first line", |
| 703 | "second line", |
| 704 | "----- END SERVER MOTD -----", |
| 705 | "", |
| 706 | ]) |
| 707 | .expect_access_token("random token") |
| 708 | .check(); |
| 709 | } |
| 710 | |
| 711 | #[test] |
| 712 | fn test_login_bad_credentials() { |
nothing calls this directly
no test coverage detected