append optional dependencies to webapp dto

This commit is contained in:
Konstantin Schaper
2020-07-22 09:55:57 +02:00
parent b51ddae59d
commit b3d5f930ea
3 changed files with 11 additions and 0 deletions

View File

@@ -164,6 +164,15 @@ class PluginDtoMapperTest {
assertThat(dto.getDependencies()).containsOnly("one", "two");
}
@Test
void shouldAppendOptionalDependencies() {
AvailablePlugin plugin = createAvailable(createPluginInformation());
when(plugin.getDescriptor().getOptionalDependencies()).thenReturn(ImmutableSet.of("one", "two"));
PluginDto dto = mapper.mapAvailable(plugin);
assertThat(dto.getOptionalDependencies()).containsOnly("one", "two");
}
@Test
void shouldAppendUninstallLink() {
when(subject.isPermitted("plugin:write")).thenReturn(true);