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

Function test_store_default_identity

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

Source from the content-addressed store, hash-verified

1033
1034 #[test]
1035 fn test_store_default_identity() {
1036 let (_temp, mut store) = create_test_store();
1037
1038 let identity = Identity::generate("default-user");
1039 store.save(&identity).unwrap();
1040
1041 assert!(store.get_default().unwrap().is_none());
1042
1043 store.set_default(&identity.id).unwrap();
1044
1045 let default = store.get_default().unwrap().unwrap();
1046 assert_eq!(default.id, identity.id);
1047 }
1048
1049 #[test]
1050 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