test the invite room check and the no-homeserver sweep, drop the last space wording
This commit is contained in:
parent
fd01848d4d
commit
ae9c3444bc
1 changed files with 25 additions and 3 deletions
|
|
@ -460,4 +460,27 @@ mod tests {
|
|||
assert!(!message.contains("free-form-marker"), "{message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// A room that is neither an id nor an alias is refused before any
|
||||
/// request is made; with no default Space left, there is nothing to fall
|
||||
/// back to.
|
||||
#[tokio::test]
|
||||
async fn invite_user_refuses_a_room_that_is_neither_an_id_nor_an_alias() {
|
||||
let client = swarm_matrix_client::client().expect("client");
|
||||
let err = invite_user(&client, "tok", "mara", "general", "example.org")
|
||||
.await
|
||||
.expect_err("a bare name is not a room");
|
||||
assert!(
|
||||
format!("{err:#}").contains("neither a room id nor an alias"),
|
||||
"{err:#}"
|
||||
);
|
||||
}
|
||||
|
||||
/// The sweep touches nothing, and reports success, on a hive with no
|
||||
/// homeserver configured (the test environment has none).
|
||||
#[tokio::test]
|
||||
async fn the_sweep_is_a_successful_no_op_without_a_homeserver() {
|
||||
assert!(!is_present());
|
||||
assert!(ensure_all().await);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue