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