small fixes

This commit is contained in:
Eduard Heimbuch
2019-08-01 09:57:18 +02:00
parent 853bf133ca
commit 2fe8c154d3
3 changed files with 14 additions and 5 deletions

View File

@@ -52,6 +52,9 @@ class AvailablePluginResourceTest {
@Mock
private PluginManager pluginManager;
@Mock
private PluginDtoMapper mapper;
@InjectMocks
AvailablePluginResource availablePluginResource;
@@ -107,6 +110,10 @@ class AvailablePluginResourceTest {
pluginInformation.setVersion("2.0.0");
when(pluginManager.getAvailable()).thenReturn(Collections.singletonList(pluginInformation));
PluginDto pluginDto = new PluginDto();
pluginDto.setName("pluginName");
when(mapper.map(pluginInformation)).thenReturn(pluginDto);
MockHttpRequest request = MockHttpRequest.get("/v2/plugins/available/pluginName/2.0.0");
request.accept(VndMediaType.PLUGIN);
MockHttpResponse response = new MockHttpResponse();