diff --git a/spec/checkPullRequestReviewSpec.js b/spec/checkPullRequestReviewSpec.js index 292622bb..bdc5ee23 100644 --- a/spec/checkPullRequestReviewSpec.js +++ b/spec/checkPullRequestReviewSpec.js @@ -1587,5 +1587,24 @@ describe('Pull Request Review Module', () => { }); } ); + + describe('when PTAL template found in the comment', () => { + const initialCommentBody = commentPayloadData.payload.comment.body; + beforeAll(() => { + commentPayloadData.payload.comment.body = ( + '{{Question/comment}} @{{reviewer_username}} PTAL'); + }); + beforeEach(async () => { + await robot.receive(commentPayloadData); + }); + + it('should not assign anyone to the PR', () => { + expect(github.issues.createComment).not.toHaveBeenCalled(); + }); + + afterAll(() => { + commentPayloadData.payload.comment.body = initialCommentBody; + }); + }); }); });