Skip to content

Commit e4a7af4

Browse files
test: add test to verify new checks are being populated
1 parent c8c7b30 commit e4a7af4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,21 @@ public void testSignedCommits() throws Exception {
189189
assertThat(protection.getRequiredSignatures(), is(false));
190190
}
191191

192+
/**
193+
* Checks with app ids are being populated
194+
*
195+
* @throws Exception
196+
* the exception
197+
*/
198+
@Test
199+
public void testChecksWithAppIds() throws Exception {
200+
GHBranchProtection protection = branch.enableProtection()
201+
.addRequiredChecksWithAppIds(new GHBranchProtection.Check("context", -1))
202+
.enable();
203+
204+
assertThat(protection.getRequiredStatusChecks().getChecks().isEmpty(), is(false));
205+
}
206+
192207
/**
193208
* Test get protection.
194209
*

0 commit comments

Comments
 (0)