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

Function test_signup_abort

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

Source from the content-addressed store, hash-verified

1082
1083 #[test]
1084 fn test_signup_abort() {
1085 let t = ClientTester::default();
1086 t.get_console().borrow_mut().set_interactive(true);
1087
1088 let mut t = t
1089 .add_input_chars("the-username\n")
1090 .add_input_chars("theP4ssword\n")
1091 .add_input_chars("theP4ssword\n")
1092 .add_input_chars("some@example.com\n")
1093 .add_input_chars("\n") // Default promotional email answer.
1094 .add_input_chars("\n"); // Default confirmation.
1095 let mut c = t.run("SIGNUP".to_owned());
1096 let output = flatten_output(c.take_captured_out());
1097 c.check();
1098
1099 assert!(output.contains("Username: the-username"));
1100 assert!(output.contains("Email address: some@example.com"));
1101 assert!(output.contains("Promotional email: no"));
1102 }
1103
1104 #[test]
1105 fn test_singup_errors() {

Callers

nothing calls this directly

Calls 7

flatten_outputFunction · 0.85
set_interactiveMethod · 0.80
get_consoleMethod · 0.45
add_input_charsMethod · 0.45
runMethod · 0.45
take_captured_outMethod · 0.45
checkMethod · 0.45

Tested by

no test coverage detected