diff --git a/src/test/java/org/jenkinsci/plugins/ghprb/GhprbRepositoryTest.java b/src/test/java/org/jenkinsci/plugins/ghprb/GhprbRepositoryTest.java index 32653c7c..5b4eb4dc 100644 --- a/src/test/java/org/jenkinsci/plugins/ghprb/GhprbRepositoryTest.java +++ b/src/test/java/org/jenkinsci/plugins/ghprb/GhprbRepositoryTest.java @@ -222,7 +222,7 @@ public void testCheckMethodWithOnlyExistingPRs() throws Exception { verify(ghPullRequest, times(2)).getHead(); verify(ghPullRequest, times(2)).getNumber(); verify(ghPullRequest, times(1)).getUpdatedAt(); - verify(ghPullRequest, times(1)).getUser(); + verify(ghPullRequest, times(2)).getUser(); verify(ghPullRequest, times(2)).getBase(); verify(ghPullRequest, times(1)).getComments(); verify(ghPullRequest, times(1)).listCommits(); @@ -290,7 +290,7 @@ public void testCheckMethodWithNewPR() throws Exception { verifyNoMoreInteractions(ghRepository); verify(ghPullRequest, times(1)).getTitle(); - verify(ghPullRequest, times(3)).getUser(); + verify(ghPullRequest, times(5)).getUser(); verify(ghPullRequest, times(1)).getMergeable(); // Call to Github API verify(ghPullRequest, times(7)).getHead(); verify(ghPullRequest, times(6)).getBase(); @@ -318,7 +318,7 @@ public void testCheckMethodWithNewPR() throws Exception { verifyNoMoreInteractions(helper); verify(ghUser, times(1)).getEmail(); // Call to Github API - verify(ghUser, times(1)).getLogin(); + verify(ghUser, times(3)).getLogin(); verifyNoMoreInteractions(ghUser); } @@ -471,7 +471,7 @@ public void testCheckBuildWithBlackWhiteLabelsSet() throws Exception { verifyNoMoreInteractions(ghRepository); verify(ghPullRequest, times(1)).getTitle(); - verify(ghPullRequest, times(3)).getUser(); + verify(ghPullRequest, times(5)).getUser(); verify(ghPullRequest, times(1)).getMergeable(); // Call to Github API verify(ghPullRequest, times(7)).getHead(); verify(ghPullRequest, times(6)).getBase(); @@ -499,7 +499,7 @@ public void testCheckBuildWithBlackWhiteLabelsSet() throws Exception { verifyNoMoreInteractions(helper); verify(ghUser, times(1)).getEmail(); // Call to Github API - verify(ghUser, times(1)).getLogin(); + verify(ghUser, times(3)).getLogin(); verifyNoMoreInteractions(ghUser); } @@ -563,7 +563,7 @@ public void testCheckMethodWhenPrWasUpdatedWithNonKeyPhrase() throws Exception { verifyNoMoreInteractions(ghRepository); verify(ghPullRequest, times(1)).getTitle(); - verify(ghPullRequest, times(5)).getUser(); + verify(ghPullRequest, times(7)).getUser(); verify(ghPullRequest, times(1)).getMergeable(); // Call to Github API verify(ghPullRequest, times(7)).getHead(); verify(ghPullRequest, times(6)).getBase(); @@ -599,7 +599,7 @@ public void testCheckMethodWhenPrWasUpdatedWithNonKeyPhrase() throws Exception { verifyNoMoreInteractions(helper); verify(ghUser, times(1)).getEmail(); // Call to Github API - verify(ghUser, times(2)).getLogin(); + verify(ghUser, times(4)).getLogin(); verify(ghUser, times(3)).getName(); verifyNoMoreInteractions(ghUser); } @@ -665,7 +665,7 @@ public void testCheckMethodWhenPrWasUpdatedWithRetestPhrase() throws Exception { verifyNoMoreInteractions(ghRepository); verify(ghPullRequest, times(2)).getTitle(); - verify(ghPullRequest, times(5)).getUser(); + verify(ghPullRequest, times(7)).getUser(); verify(ghPullRequest, times(2)).getMergeable(); // Call to Github API verify(ghPullRequest, times(9)).getHead(); verify(ghPullRequest, times(7)).getBase(); @@ -701,7 +701,7 @@ public void testCheckMethodWhenPrWasUpdatedWithRetestPhrase() throws Exception { verifyNoMoreInteractions(helper); verify(ghUser, times(1)).getEmail(); // Call to Github API - verify(ghUser, times(2)).getLogin(); + verify(ghUser, times(4)).getLogin(); verify(ghUser, times(2)).getName(); verifyNoMoreInteractions(ghUser);