mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-18 03:01:05 +01:00
Fix unit tests
This commit is contained in:
@@ -88,6 +88,9 @@ public class UserCollectionResource extends AbstractManagerResource<User, UserEx
|
||||
})
|
||||
@TypeHint(TypeHint.NO_CONTENT.class)
|
||||
public Response create(@Context UriInfo uriInfo, UserDto userDto) throws IOException, UserException {
|
||||
if (userDto == null) {
|
||||
return Response.status(400).build();
|
||||
}
|
||||
User user = dtoToUserMapper.map(userDto, "");
|
||||
manager.create(user);
|
||||
return Response.created(URI.create(user(uriInfo).self(user.getName()))).build();
|
||||
|
||||
@@ -39,7 +39,7 @@ public class GroupCollectionToDtoMapperTest {
|
||||
|
||||
@Before
|
||||
public void init() throws URISyntaxException {
|
||||
// uriInfoStore.set(uriInfo);
|
||||
uriInfoStore.set(uriInfo);
|
||||
URI baseUri = new URI("http://example.com/base/");
|
||||
expectedBaseUri = baseUri.resolve(GroupV2Resource.GROUPS_PATH_V2 + "/");
|
||||
when(uriInfo.getBaseUri()).thenReturn(baseUri);
|
||||
|
||||
Reference in New Issue
Block a user