integration test for undo