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

Function test_put_and_get_trunk

atomic-core/src/crdt/apply/traits.rs:681–689  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

679
680 #[test]
681 fn test_put_and_get_trunk() {
682 let mut txn = MockCrdtTxn::new();
683 let id = TrunkId::new(NodeId::new(1), 0);
684 let trunk = Trunk::new(id, Inode::new(1), "test.rs".to_string(), None);
685
686 assert!(txn.put_trunk(&trunk).unwrap());
687 let retrieved = txn.get_trunk(id).unwrap().unwrap();
688 assert_eq!(retrieved.path(), "test.rs");
689 }
690
691 #[test]
692 fn test_has_trunk() {

Callers

nothing calls this directly

Calls 2

unwrapMethod · 0.45
get_trunkMethod · 0.45

Tested by

no test coverage detected