Browse Source

Add test for set_tickers().

main
Titouan Rigoudy 2 years ago
parent
commit
364c777f3e
1 changed files with 20 additions and 0 deletions
  1. +20
    -0
      client/src/room/map.rs

+ 20
- 0
client/src/room/map.rs View File

@ -438,6 +438,26 @@ mod tests {
assert_eq!(room.into_state(), RoomState::default());
}
#[test]
fn entry_set_tickers() {
let mut room = RoomEntry::new("bleep".to_string(), RoomState::default());
let tickers = vec![
("shruti".to_string(), "hello".to_string()),
("karandeep".to_string(), "yo".to_string()),
];
room.set_tickers(tickers.clone());
assert_eq!(
room.into_state(),
RoomState {
tickers,
..RoomState::default()
}
);
}
#[test]
fn map_new_is_empty() {
assert_eq!(RoomMap::new().get_room_list(), vec![]);


Loading…
Cancel
Save