Sync public tree to bc3642c
This commit is contained in:
parent
2c2dfdf8e2
commit
81942fa2ad
4 changed files with 58 additions and 8 deletions
|
|
@ -7903,6 +7903,27 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cli_has_no_direct_hosted_account_creation_command() {
|
||||
for args in [
|
||||
&["disasmer", "signup"][..],
|
||||
&["disasmer", "account", "create"],
|
||||
&["disasmer", "login", "--create-account"],
|
||||
] {
|
||||
let error = Cli::try_parse_from(args).unwrap_err().to_string();
|
||||
assert!(
|
||||
error.contains("unrecognized subcommand") || error.contains("unexpected argument"),
|
||||
"expected no direct account creation command for {args:?}, got {error}"
|
||||
);
|
||||
}
|
||||
|
||||
let mut command = Cli::command();
|
||||
let help = command.render_help().to_string();
|
||||
assert!(help.contains("Hosted account creation happens in the browser login flow."));
|
||||
assert!(!help.contains("disasmer signup"));
|
||||
assert!(!help.contains("account create"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn admin_bootstrap_reports_self_hosted_cli_only_path() {
|
||||
let temp = tempfile::tempdir().unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue