Skip to content

Commit ad94288

Browse files
authored
Merge branch 'master' into JENKINS-72030
2 parents 480b5d0 + 60a8117 commit ad94288

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/org/jenkinsci/plugins/github_branch_source/GithubSCMSourceBranchesTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ public void testThrownErrorSingleBranchException() throws IOException {
8080
context.wantBranches(true);
8181
GitHubSCMSourceRequest request =
8282
context.newRequest(new GitHubSCMSource("cloudbeers", "yolo", null, false), null);
83-
Mockito.doThrow(e).when(repoSpy).getRef("branches/existent-branch");
83+
Mockito.doThrow(e).when(repoSpy).getBranch("existent-branch");
8484
// Expected: This will throw an error when requesting a branch
8585
try {
8686
Iterator<GHBranch> branches = new GitHubSCMSource.LazyBranches(request, repoSpy).iterator();
8787
fail("This should throw an exception");
8888
} catch (Error error) {
8989
// Error is expected here so this is "success"
90-
assertEquals("Bad Branch Request", e.getMessage());
90+
assertEquals("Bad Branch Request", error.getMessage());
9191
}
9292
}
9393

0 commit comments

Comments
 (0)