mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
Correct uri for create response
This commit is contained in:
@@ -69,6 +69,6 @@ public class RepositoryCollectionResource {
|
||||
public Response create(RepositoryDto repositoryDto) throws IOException, RepositoryException {
|
||||
return adapter.create(repositoryDto,
|
||||
() -> dtoToRepositoryMapper.map(repositoryDto),
|
||||
user -> resourceLinks.user().self(user.getName()));
|
||||
repository -> resourceLinks.repository().self(repository.getNamespace(), repository.getName()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,6 +171,7 @@ public class RepositoryRootResourceTest {
|
||||
dispatcher.invoke(request, response);
|
||||
|
||||
assertEquals(HttpServletResponse.SC_CREATED, response.getStatus());
|
||||
assertEquals("/v2/repositories/space/repo", response.getOutputHeaders().get("Location").get(0).toString());
|
||||
verify(repositoryManager).create(any(Repository.class));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user