add tests for pull request badge comment
refactoring and new tests