Refactor editing tests