Skip to content

Commit

Permalink
fix(fork): Test rewriting
Browse files Browse the repository at this point in the history
  • Loading branch information
gounthar committed Dec 12, 2024
1 parent 3de3002 commit 43730bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test/java/org/kohsuke/github/GHRepositoryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,10 @@ public void ghRepositorySearchBuilderForkDefaultResetForksSearchTerms() {
*/
@Test
public void testCreateForkWithValidParameters() throws IOException {
GHRepository repository = getRepository();
GHRepository forkedRepository = repository.createFork("new-owner", "new-repo", true);
String repositoryName = "rubywm";
String upstreamRepositoryOrganization = "kohsuke";
cleanupRepository(GITHUB_API_TEST_ORG + "/" + repositoryName);
GHRepository forkedRepository = gitHub.getRepository(upstreamRepositoryOrganization + "/" + repositoryName).createFork(gitHub.getOrganization(GITHUB_API_TEST_ORG).name, repositoryName, true);
assertThat(forkedRepository, notNullValue());
assertThat(forkedRepository.getOwnerName(), equalTo("new-owner"));
assertThat(forkedRepository.getName(), equalTo("new-repo"));
Expand Down

0 comments on commit 43730bf

Please sign in to comment.