mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-17 02:31:14 +01:00
Added optional revision path param to SourceRootResource#getAll
This commit is contained in:
@@ -135,8 +135,8 @@ public class ResourceLinksTest {
|
||||
|
||||
@Test
|
||||
public void shouldCreateCorrectBranchSourceUrl() {
|
||||
String url = resourceLinks.source().source("space", "name", "revision");
|
||||
assertEquals(BASE_URL + RepositoryRootResource.REPOSITORIES_PATH_V2 + "space/name/sources/revision", url);
|
||||
String url = resourceLinks.source().selfWithoutRevision("space", "name");
|
||||
assertEquals(BASE_URL + RepositoryRootResource.REPOSITORIES_PATH_V2 + "space/name/sources/", url);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -147,18 +147,18 @@ public class ResourceLinksTest {
|
||||
|
||||
@Test
|
||||
public void shouldCreateCorrectSourceCollectionUrl() {
|
||||
String url = resourceLinks.source().withoutRevision("space", "repo");
|
||||
String url = resourceLinks.source().selfWithoutRevision("space", "repo");
|
||||
assertEquals(BASE_URL + RepositoryRootResource.REPOSITORIES_PATH_V2 + "space/repo/sources/", url);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldCreateCorrectSourceUrlWithFilename() {
|
||||
String url = resourceLinks.source().withPath("foo", "bar", "rev", "file");
|
||||
String url = resourceLinks.source().sourceWithPath("foo", "bar", "rev", "file");
|
||||
assertEquals(BASE_URL + RepositoryRootResource.REPOSITORIES_PATH_V2 + "foo/bar/sources/rev/file", url);
|
||||
}
|
||||
@Test
|
||||
public void shouldCreateCorrectPermissionCollectionUrl() {
|
||||
String url = resourceLinks.source().withoutRevision("space", "repo");
|
||||
String url = resourceLinks.source().selfWithoutRevision("space", "repo");
|
||||
assertEquals(BASE_URL + RepositoryRootResource.REPOSITORIES_PATH_V2 + "space/repo/sources/", url);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user