Skip to content

Commit 8d06a5d

Browse files
committed
fix wiremock error
1 parent f14c049 commit 8d06a5d

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/test/java/org/kohsuke/github/GHContentIntegrationTest.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import org.apache.commons.io.IOUtils;
44
import org.junit.After;
5+
import org.junit.Assert;
56
import org.junit.Before;
67
import org.junit.Test;
78

@@ -170,6 +171,7 @@ int checkCreatedCommits(GitCommit gitCommit, GHCommit ghCommit, int expectedRequ
170171

171172
assertThat(ghCommit.getCommitShortInfo().getMessage(), equalTo("Creating a file for integration tests."));
172173
assertThat("Message already resolved", mockGitHub.getRequestCount(), equalTo(expectedRequestCount));
174+
Assert.assertThrows(GHException.class, () -> ghCommit.getCommitShortInfo().getCommentCount());
173175

174176
ghCommit.populate();
175177
assertThat("Populate GHCommit", mockGitHub.getRequestCount(), equalTo(expectedRequestCount += 1));
@@ -347,13 +349,6 @@ public void testMIMELonger() throws IOException {
347349
ghContentBuilder.commit();
348350
}
349351

350-
@Test(expected = GHException.class)
351-
public void testGetCommentCountFailsFromGitCommit() throws Exception {
352-
GitCommit gitCommit = new GitCommit();
353-
GHCommit ghCommit = new GHCommit(new GHCommit.ShortInfo(gitCommit));
354-
ghCommit.getCommitShortInfo().getCommentCount();
355-
}
356-
357352
@Test
358353
public void testGetFileContentWithNonAsciiPath() throws Exception {
359354
final GHRepository repo = gitHub.getRepository("hub4j-test-org/GHContentIntegrationTest");

0 commit comments

Comments
 (0)