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

Function test_create_trunk

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

Source from the content-addressed store, hash-verified

849
850 #[test]
851 fn test_create_trunk() {
852 let mut txn = MockCrdtTxn::new();
853 let id = TrunkId::new(NodeId::new(1), 0);
854
855 let trunk = txn
856 .create_trunk(id, "test.rs", Some(Encoding::Utf8))
857 .unwrap();
858
859 assert_eq!(trunk.id(), id);
860 assert_eq!(trunk.path(), "test.rs");
861 assert_eq!(trunk.encoding(), Some(Encoding::Utf8));
862 assert!(txn.has_trunk(id).unwrap());
863 }
864
865 #[test]
866 fn test_mark_trunk_deleted() {

Callers

nothing calls this directly

Calls 2

create_trunkMethod · 0.80
unwrapMethod · 0.45

Tested by

no test coverage detected