Skip to content

Commit

Permalink
[Fix JENKINS-29731] Bad diff link from AssemblaWeb browser
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEWaite committed Aug 2, 2015
1 parent 5c7381c commit af01132
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/hudson/plugins/git/browser/AssemblaWeb.java
Expand Up @@ -48,7 +48,7 @@ private QueryBuilder param(URL url) {
@Override
public URL getChangeSetLink(GitChangeSet changeSet) throws IOException {
URL url = getUrl();
return new URL(url, url.getPath() + "commit/" + changeSet.getId());
return new URL(url, url.getPath() + "commits/" + changeSet.getId());
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/hudson/plugins/git/browser/AssemblaWebTest.java
Expand Up @@ -38,7 +38,7 @@ public static Collection permuteAuthorName() {
@Test
public void testGetChangeSetLink() throws Exception {
URL result = (new AssemblaWeb(repoUrl)).getChangeSetLink(sample.changeSet);
assertEquals(new URL(repoUrl + "commit/" + sample.id), result);
assertEquals(new URL(repoUrl + "commits/" + sample.id), result);
}

@Test
Expand All @@ -47,7 +47,7 @@ public void testGetDiffLink() throws Exception {
for (GitChangeSet.Path path : sample.changeSet.getPaths()) {
URL diffLink = assemblaWeb.getDiffLink(path);
EditType editType = path.getEditType();
URL expectedDiffLink = new URL(repoUrl + "commit/" + sample.id);
URL expectedDiffLink = new URL(repoUrl + "commits/" + sample.id);
String msg = "Wrong link for path: " + path.getPath() + ", edit type: " + editType.getName();
assertEquals(msg, expectedDiffLink, diffLink);
}
Expand Down

0 comments on commit af01132

Please sign in to comment.