Skip to content

Commit

Permalink
MatrixNotificationTest: before(): mock getProject() explicitly where …
Browse files Browse the repository at this point in the history
…we earlier mocked just getParent()
  • Loading branch information
jimklimov committed May 24, 2023
1 parent 05abb72 commit bf50da8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/test/java/hudson/plugins/im/MatrixNotificationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public void before() throws InterruptedException, IOException {

this.configurationBuild = mock(AbstractBuild.class);
AbstractProject project = mock(MatrixConfiguration.class);
when(configurationBuild.getParent()).thenReturn(project);
when(configurationBuild.getProject()).thenReturn(project); // Seems required since https://github.com/jenkinsci/instant-messaging-plugin/pull/171 bump
when(configurationBuild.getParent()).thenReturn(project); // => should pop out in AbstractBuild.getProject()

this.parentBuild = mock(MatrixBuild.class);
}
Expand Down

0 comments on commit bf50da8

Please sign in to comment.