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

Function test_store_list

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

Source from the content-addressed store, hash-verified

828
829 #[test]
830 fn test_store_list() {
831 let (_temp, store) = create_test_store();
832
833 let alice = Identity::generate("alice");
834 let bob = Identity::generate("bob");
835
836 store.save(&alice).unwrap();
837 store.save(&bob).unwrap();
838
839 let identities = store.list().unwrap();
840 assert_eq!(identities.len(), 2);
841
842 let names: Vec<_> = identities.iter().map(|i| i.name.as_str()).collect();
843 assert!(names.contains(&"alice"));
844 assert!(names.contains(&"bob"));
845 }
846
847 #[test]
848 fn test_store_list_filtered() {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected