()
| 773 | |
| 774 | #[test] |
| 775 | fn test_apply_move_same_path() { |
| 776 | let mut txn = MockTxn::new(); |
| 777 | let mut context = ApplyContext::new(ApplyOptions::default()); |
| 778 | let trunk_id = TrunkId::new(NodeId::new(1), 0); |
| 779 | |
| 780 | // Create |
| 781 | let create_op = TrunkOp::Create { |
| 782 | path: "test.rs".to_string(), |
| 783 | encoding: None, |
| 784 | }; |
| 785 | apply_trunk_op(&mut txn, &mut context, trunk_id, &create_op).unwrap(); |
| 786 | |
| 787 | // Move to same path (no-op) |
| 788 | let move_op = TrunkOp::Move { |
| 789 | trunk: trunk_id, |
| 790 | new_path: "test.rs".to_string(), |
| 791 | }; |
| 792 | apply_trunk_op(&mut txn, &mut context, trunk_id, &move_op).unwrap(); |
| 793 | |
| 794 | assert_eq!(context.stats().operations_skipped(), 1); |
| 795 | assert_eq!(context.stats().trunks_moved(), 0); |
| 796 | } |
| 797 | |
| 798 | // Undelete Tests |
| 799 |
nothing calls this directly
no test coverage detected