File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
src/test/java/com/dabsquared/gitlabjenkins/webhook/build Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,21 @@ public void build() throws IOException {
111111 assertThat (pushHookArgumentCaptor .getValue ().getUser (), is (notNullValue ()));
112112 assertThat (pushHookArgumentCaptor .getValue ().getUser ().getName (), containsString ("Administrator" ));
113113 assertThat (pushHookArgumentCaptor .getValue ().getUser ().getUsername (), containsString ("root" ));
114+ assertThat (
115+ pushHookArgumentCaptor
116+ .getValue ()
117+ .getObjectAttributes ()
118+ .getLastCommit ()
119+ .getAuthor (),
120+ is (notNullValue ()));
121+ assertThat (
122+ pushHookArgumentCaptor
123+ .getValue ()
124+ .getObjectAttributes ()
125+ .getLastCommit ()
126+ .getAuthor ()
127+ .getName (),
128+ containsString ("GitLab dev user" ));
114129 }
115130 }
116131
Original file line number Diff line number Diff line change @@ -85,6 +85,21 @@ public void build() throws IOException {
8585 assertThat (noteHookArgumentCaptor .getValue ().getUser (), is (notNullValue ()));
8686 assertThat (noteHookArgumentCaptor .getValue ().getUser ().getName (), containsString ("Administrator" ));
8787 assertThat (noteHookArgumentCaptor .getValue ().getUser ().getUsername (), containsString ("root" ));
88+ assertThat (
89+ noteHookArgumentCaptor
90+ .getValue ()
91+ .getMergeRequest ()
92+ .getLastCommit ()
93+ .getAuthor (),
94+ is (notNullValue ()));
95+ assertThat (
96+ noteHookArgumentCaptor
97+ .getValue ()
98+ .getMergeRequest ()
99+ .getLastCommit ()
100+ .getAuthor ()
101+ .getName (),
102+ containsString ("John Smith" ));
88103 }
89104 }
90105
You can’t perform that action at this time.
0 commit comments