cargo fmt/update fixed olm
parent
7aeeeea432
commit
5180f99a0e
|
@ -291,8 +291,8 @@ mod test {
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{AsyncClient, Session, identifiers::RoomId};
|
|
||||||
use crate::events::room::power_levels::NotificationPowerLevels;
|
use crate::events::room::power_levels::NotificationPowerLevels;
|
||||||
|
use crate::{identifiers::RoomId, AsyncClient, Session};
|
||||||
|
|
||||||
use js_int::Int;
|
use js_int::Int;
|
||||||
use mockito::{mock, Matcher};
|
use mockito::{mock, Matcher};
|
||||||
|
@ -331,7 +331,9 @@ mod test {
|
||||||
redact: Int::max_value(),
|
redact: Int::max_value(),
|
||||||
state_default: Int::min_value(),
|
state_default: Int::min_value(),
|
||||||
users_default: Int::min_value(),
|
users_default: Int::min_value(),
|
||||||
notifications: NotificationPowerLevels { room: Int::min_value() },
|
notifications: NotificationPowerLevels {
|
||||||
|
room: Int::min_value(),
|
||||||
|
},
|
||||||
users: HashMap::default(),
|
users: HashMap::default(),
|
||||||
})
|
})
|
||||||
.preset(RoomPreset::PrivateChat)
|
.preset(RoomPreset::PrivateChat)
|
||||||
|
@ -346,7 +348,10 @@ mod test {
|
||||||
async fn get_message_events() {
|
async fn get_message_events() {
|
||||||
let homeserver = Url::parse(&mockito::server_url()).unwrap();
|
let homeserver = Url::parse(&mockito::server_url()).unwrap();
|
||||||
|
|
||||||
let _m = mock("GET", Matcher::Regex(r"^/_matrix/client/r0/rooms/.*/messages".to_string()))
|
let _m = mock(
|
||||||
|
"GET",
|
||||||
|
Matcher::Regex(r"^/_matrix/client/r0/rooms/.*/messages".to_string()),
|
||||||
|
)
|
||||||
.with_status(200)
|
.with_status(200)
|
||||||
.with_body_from_file("./tests/data/room_messages.json")
|
.with_body_from_file("./tests/data/room_messages.json")
|
||||||
.create();
|
.create();
|
||||||
|
@ -358,8 +363,7 @@ mod test {
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut bldr = GetMessageBuilder::new();
|
let mut bldr = GetMessageBuilder::new();
|
||||||
bldr
|
bldr.room_id(RoomId::try_from("!roomid:example.com").unwrap())
|
||||||
.room_id(RoomId::try_from("!roomid:example.com").unwrap())
|
|
||||||
.from("t47429-4392820_219380_26003_2265".to_string())
|
.from("t47429-4392820_219380_26003_2265".to_string())
|
||||||
.to("t4357353_219380_26003_2265".to_string())
|
.to("t4357353_219380_26003_2265".to_string())
|
||||||
.direction(Direction::Backward)
|
.direction(Direction::Backward)
|
||||||
|
|
Loading…
Reference in New Issue