Tree traversal from commit & its associated tests

This commit is contained in:
Kohsuke Kawaguchi
2016-12-17 07:21:31 -08:00
parent b5386a35ee
commit a454fb10ec
3 changed files with 32 additions and 0 deletions

View File

@@ -363,6 +363,11 @@ public class AppTest extends AbstractGitHubApiTestBase {
assertEquals(48,f.getLinesChanged());
assertEquals("modified",f.getStatus());
assertEquals("changelog.html", f.getFileName());
// walk the tree
GHTree t = commit.getTree();
assertThat(IOUtils.toString(t.getEntry("todo.txt").readAsBlob()), containsString("executor rendering"));
assertNotNull(t.getEntry("war").asTree());
}
@Test