Fixed the getReadme() method.

It was calling the wrong endpoint.
Fixed issue #99.
This commit is contained in:
Kohsuke Kawaguchi
2015-02-15 06:31:22 -08:00
parent 18696fca2d
commit 1dbcc4b776
3 changed files with 14 additions and 2 deletions

View File

@@ -658,6 +658,13 @@ public class AppTest extends AbstractGitHubApiTestBase {
}
}
@Test // issue #99
public void testReadme() throws IOException {
GHContent readme = gitHub.getRepository("github-api-test-org/test-readme").getReadme();
assertEquals(readme.getName(),"README.md");
assertEquals(readme.getContent(),"This is a markdown readme.\n");
}
private void kohsuke() {
String login = getUser().getLogin();
Assume.assumeTrue(login.equals("kohsuke") || login.equals("kohsuke2"));