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

Function test_store_default_identity

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

Source from the content-addressed store, hash-verified

882
883 #[test]
884 fn test_store_default_identity() {
885 let (_temp, mut store) = create_test_store();
886
887 let identity = Identity::generate("default-user");
888 store.save(&identity).unwrap();
889
890 assert!(store.get_default().unwrap().is_none());
891
892 store.set_default(&identity.id).unwrap();
893
894 let default = store.get_default().unwrap().unwrap();
895 assert_eq!(default.id, identity.id);
896 }
897
898 #[test]
899 fn test_store_default_by_usage() {

Callers

nothing calls this directly

Calls 5

create_test_storeFunction · 0.70
unwrapMethod · 0.45
saveMethod · 0.45
set_defaultMethod · 0.45
get_defaultMethod · 0.45

Tested by

no test coverage detected