Skip to content

Commit f65c149

Browse files
committed
More code coverage
1 parent 0cd3828 commit f65c149

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,8 @@ public void testGetDeploymentStatuses() throws IOException {
336336
assertThat(actualStatus.getLogUrl(), equalTo(ghDeploymentStatus.getLogUrl()));
337337
assertThat(ghDeploymentStatus.getDeploymentUrl(), equalTo(deployment.getUrl()));
338338
assertThat(ghDeploymentStatus.getRepositoryUrl(), equalTo(repository.getUrl()));
339+
assertThat(ghDeploymentStatus.getEnvironmentUrl().toString(), equalTo("http://www.github.com/envurl"));
340+
339341
} finally {
340342
// deployment.delete();
341343
assert true;
@@ -1419,7 +1421,6 @@ public void testIssueSearch() {
14191421
PagedIterable<GHIssueComment> comments = issue.listComments();
14201422
for (GHIssueComment comment : comments) {
14211423
assertThat(comment, notNullValue());
1422-
14231424
}
14241425
}
14251426
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public void testGetDeploymentByIdStringPayload() throws IOException {
4343
assertThat(deployment.getOriginalEnvironment(), equalTo("production"));
4444
assertThat(deployment.isProductionEnvironment(), equalTo(false));
4545
assertThat(deployment.isTransientEnvironment(), equalTo(true));
46+
assertThat(deployment.getStatusesUrl().toString(),
47+
endsWith("/repos/hub4j-test-org/github-api/deployments/178653229/statuses"));
48+
assertThat(deployment.getRepositoryUrl().toString(), endsWith("/repos/hub4j-test-org/github-api"));
4649
}
4750

4851
/**

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,14 @@ public void testCreateCardFromIssue() throws IOException {
9191
try {
9292
GHIssue issue = repo.createIssue("new-issue").body("With body").create();
9393
GHProjectCard card = column.createCard(issue);
94+
assertThat(column.getProjectUrl(), equalTo(card.getProjectUrl()));
95+
9496
assertThat(card.getContentUrl(), equalTo(issue.getUrl()));
9597
assertThat(card.getContent().getUrl(), equalTo(issue.getUrl()));
9698
assertThat(card.getContent().getRepository().getUrl(), equalTo(repo.getUrl()));
99+
assertThat(card.getProjectUrl().toString(), endsWith("/projects/13495086"));
100+
assertThat(card.getColumnUrl().toString(), endsWith("/projects/columns/16361848"));
101+
97102
} finally {
98103
repo.delete();
99104
}

0 commit comments

Comments
 (0)