From e16661988336e9c81da6a4f33b72c975f412bb1d Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Mon, 10 May 2021 00:08:33 +0900 Subject: [PATCH] client(datastore): fix tests --- client/src/data_store.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/src/data_store.rs b/client/src/data_store.rs index e23d45c..17649c5 100644 --- a/client/src/data_store.rs +++ b/client/src/data_store.rs @@ -215,6 +215,14 @@ mod tests { // Should work, since peer is unmodified. store.update_peers(vec![]).unwrap(); - assert_eq!(store.peers(), &*BASE_PEERS); + let new_peers = BASE_PEERS + .iter() + .cloned() + .map(|mut p| { + p.contents.is_disabled = true; + p + }) + .collect::>(); + assert_eq!(store.peers(), &new_peers); } }