Skip to content

Commit

Permalink
#395 - Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico Peeters committed Jun 26, 2018
1 parent 8358966 commit 02f610e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class GithubId {
private final String number;

public static Optional<GithubId> fromString(final String githubIdAsString) {
final Pattern pattern = Pattern.compile("^.*?/?(?<owner>.+)/(?<repo>.+)/.+/(?<number>\\d+)$");
final Pattern pattern = Pattern.compile("^.*/(?<owner>.+)/(?<repo>.+)/.+/(?<number>\\d+)$");
final Matcher matcher = pattern.matcher(githubIdAsString);
if (matcher.matches()) {
return Optional.of(GithubId.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ public void fetch_issueRandomlyReferencedInPullRequestFromOtherRepo() {
}

@Test
public void fetch_() {
final String owner = "FundRequest";
final String repo = "contracts";
final String number = "50";
public void fetch_githubClosingKeywordsAreFound() {
final String owner = "poanetwork";
final String repo = "poa-explorer";
final String number = "237";

final GithubIssue githubIssue = scraper.fetchGithubIssue(owner, repo, number);

assertThat(githubIssue.getNumber()).isEqualTo("50");
assertThat(githubIssue.getSolver()).isEqualTo("thomasvds");
assertThat(githubIssue.getNumber()).isEqualTo("237");
assertThat(githubIssue.getSolver()).isEqualTo("katibest");
assertThat(githubIssue.getStatus()).isEqualTo("Closed");
}
}

0 comments on commit 02f610e

Please sign in to comment.