refactoring for reuse in test suite
added test for update and ensure history is respected when creating PRs