mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-16 12:43:01 -04:00
Most tests would randomize the username when creating a `TestClientBuilder`; make it the default, since it's a sensible choice, and avoids interference between different tests / test runs. A single test required an actual non-randomized username, so a specific way to opt out from this new default behavior has been introduced.
13 lines
397 B
Rust
13 lines
397 B
Rust
use anyhow::Result;
|
|
|
|
use crate::helpers::TestClientBuilder;
|
|
|
|
#[tokio::test(flavor = "multi_thread")]
|
|
async fn register_login_is_one_device() -> Result<()> {
|
|
// registers a fresh client and makes sure we are logged in
|
|
let client = TestClientBuilder::new("alice").use_sqlite().build().await?;
|
|
let devices = client.devices().await?.devices;
|
|
assert_eq!(devices.len(), 1);
|
|
Ok(())
|
|
}
|