Commit 56f61c8ae6

56f61c8ae66b09e52d0c228a2299ab71ae3bb70c

parent: 505ef13448

Unsigned

Darafei Praliaskouski <me@komzpa.net> · 2026-07-08 13:04 UTC
committer: <strk@kbt.io>

test: merge room test modules

Layout: unified · split

src/room/mod.rs +13 −18
@@ -105,24 +105,6 @@ fn restored_prev_batch(prev_batch: Option<String>) -> Option<PrevBatch> {
105105 prev_batch.map(PrevBatch::Backwards)
106106}
107107
108#[cfg(test)]
109mod tests {
110 use super::{restored_prev_batch, PrevBatch};
111
112 #[test]
113 fn restored_rooms_fetch_history_backwards_from_prev_batch() {
114 assert_eq!(
115 restored_prev_batch(Some("token".to_owned())),
116 Some(PrevBatch::Backwards("token".to_owned()))
117 );
118 }
119
120 #[test]
121 fn restored_rooms_without_prev_batch_have_no_history_request() {
122 assert_eq!(restored_prev_batch(None), None);
123 }
124}
125
126108impl Deref for RoomHandle {
127109 type Target = MatrixRoom;
128110
@@ -1384,6 +1366,19 @@ mod tests {
13841366 RoomMessageEventContent::text_plain(body)
13851367 }
13861368
1369 #[test]
1370 fn restored_rooms_fetch_history_backwards_from_prev_batch() {
1371 assert_eq!(
1372 restored_prev_batch(Some("token".to_owned())),
1373 Some(PrevBatch::Backwards("token".to_owned()))
1374 );
1375 }
1376
1377 #[test]
1378 fn restored_rooms_without_prev_batch_have_no_history_request() {
1379 assert_eq!(restored_prev_batch(None), None);
1380 }
1381
13871382 #[test]
13881383 fn transaction_event_without_id_renders_normally() {
13891384 let queue = MessageQueue::new();