feat(llc): add additional parameters to channel.truncate

This commit is contained in:
Salvatore Giordano
2022-04-12 11:29:40 +02:00
parent 432579e04b
commit 58536e56c0
4 changed files with 48 additions and 11 deletions
@@ -481,14 +481,21 @@ void main() {
final path = '${_getChannelUrl(channelId, channelType)}/truncate';
when(() => client.post(path)).thenAnswer(
(_) async => successResponse(path, data: <String, dynamic>{}));
when(() => client.post(
path,
data: {},
))
.thenAnswer(
(_) async => successResponse(path, data: <String, dynamic>{}));
final res = await channelApi.truncateChannel(channelId, channelType);
expect(res, isNotNull);
verify(() => client.post(path)).called(1);
verify(() => client.post(
path,
data: {},
)).called(1);
verifyNoMoreInteractions(client);
});