mirror of
https://github.com/aljazceru/lnd-manageJ.git
synced 2026-01-21 15:04:22 +01:00
get channel IDs for open channels in compact format
This commit is contained in:
@@ -15,6 +15,8 @@ import java.util.Set;
|
||||
|
||||
import static de.cotto.lndmanagej.model.ChannelIdFixtures.CHANNEL_ID;
|
||||
import static de.cotto.lndmanagej.model.ChannelIdFixtures.CHANNEL_ID_3;
|
||||
import static de.cotto.lndmanagej.model.ChannelIdFixtures.CHANNEL_ID_COMPACT;
|
||||
import static de.cotto.lndmanagej.model.ChannelIdFixtures.CHANNEL_ID_COMPACT_3;
|
||||
import static de.cotto.lndmanagej.model.LocalChannelFixtures.LOCAL_CHANNEL;
|
||||
import static de.cotto.lndmanagej.model.LocalChannelFixtures.LOCAL_CHANNEL_3;
|
||||
import static de.cotto.lndmanagej.model.LocalChannelFixtures.LOCAL_CHANNEL_TO_NODE_3;
|
||||
@@ -74,6 +76,13 @@ class LegacyControllerIT {
|
||||
.andExpect(content().string(CHANNEL_ID + "\n" + CHANNEL_ID_3));
|
||||
}
|
||||
|
||||
@Test
|
||||
void getOpenChannelIdsCompact() throws Exception {
|
||||
when(channelService.getOpenChannels()).thenReturn(Set.of(LOCAL_CHANNEL, LOCAL_CHANNEL_3));
|
||||
mockMvc.perform(get("/legacy/open-channels/compact"))
|
||||
.andExpect(content().string(CHANNEL_ID_COMPACT + "\n" + CHANNEL_ID_COMPACT_3));
|
||||
}
|
||||
|
||||
@Test
|
||||
void isSyncedToChain_true() throws Exception {
|
||||
when(ownNodeService.isSyncedToChain()).thenReturn(true);
|
||||
|
||||
Reference in New Issue
Block a user