get all channels for peer

This commit is contained in:
Carsten Otto
2021-11-15 19:20:30 +01:00
parent 19e664ff35
commit 4d5ba9d2d8
10 changed files with 82 additions and 4 deletions

View File

@@ -80,6 +80,13 @@ class LegacyControllerIT {
.andExpect(content().string(CHANNEL_ID + "\n" + CHANNEL_ID_3));
}
@Test
void getAllChannelIds_for_peer() throws Exception {
when(channelService.getAllChannelsWith(PUBKEY)).thenReturn(Set.of(LOCAL_OPEN_CHANNEL, CLOSED_CHANNEL_3));
mockMvc.perform(get(PUBKEY_BASE + "/all-channels"))
.andExpect(content().string(CHANNEL_ID + "\n" + CHANNEL_ID_3));
}
@Test
void getOpenChannelIds() throws Exception {
when(channelService.getOpenChannels()).thenReturn(Set.of(LOCAL_OPEN_CHANNEL, LOCAL_OPEN_CHANNEL_3));