get available remote balance

This commit is contained in:
Carsten Otto
2021-11-12 18:13:19 +01:00
parent a746dfd664
commit 9cd344b7ae
13 changed files with 159 additions and 76 deletions

View File

@@ -148,4 +148,12 @@ class LegacyControllerIT {
mockMvc.perform(get(CHANNEL_BASE + "/available-local-balance"))
.andExpect(content().string(String.valueOf(availableBalance.satoshis())));
}
@Test
void getAvailableRemoteBalance() throws Exception {
Coins availableBalance = Coins.ofSatoshis(999);
when(balanceService.getAvailableRemoteBalance(CHANNEL_ID)).thenReturn(availableBalance);
mockMvc.perform(get(CHANNEL_BASE + "/available-remote-balance"))
.andExpect(content().string(String.valueOf(availableBalance.satoshis())));
}
}