MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_store_list

Function test_store_list

atomic-identity/src/store.rs:981–996  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

979
980 #[test]
981 fn test_store_list() {
982 let (_temp, store) = create_test_store();
983
984 let alice = Identity::generate("alice");
985 let bob = Identity::generate("bob");
986
987 store.save(&alice).unwrap();
988 store.save(&bob).unwrap();
989
990 let identities = store.list().unwrap();
991 assert_eq!(identities.len(), 2);
992
993 let names: Vec<_> = identities.iter().map(|i| i.name.as_str()).collect();
994 assert!(names.contains(&"alice"));
995 assert!(names.contains(&"bob"));
996 }
997
998 #[test]
999 fn test_store_list_filtered() {

Callers

nothing calls this directly

Calls 7

create_test_storeFunction · 0.70
unwrapMethod · 0.45
saveMethod · 0.45
listMethod · 0.45
collectMethod · 0.45
iterMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected