fixed test

This commit is contained in:
Deven Joshi
2021-08-20 16:13:46 +05:30
parent feac07057a
commit b7ba8b5e85
@@ -611,7 +611,7 @@ void main() {
const channelType = 'test-channel-type'; const channelType = 'test-channel-type';
const cooldown = 10; const cooldown = 10;
const set = { const set = {
'ccooldown': 10, 'cooldown': 10,
}; };
final path = _getChannelUrl(channelId, channelType); final path = _getChannelUrl(channelId, channelType);
@@ -623,9 +623,7 @@ void main() {
); );
when(() => client.patch(path, data: { when(() => client.patch(path, data: {
'set': { 'set': set,
'cooldown': cooldown,
},
})).thenAnswer((_) async => successResponse(path, data: { })).thenAnswer((_) async => successResponse(path, data: {
'channel': channelModel.toJson(), 'channel': channelModel.toJson(),
})); }));
@@ -636,9 +634,7 @@ void main() {
expect(res, isNotNull); expect(res, isNotNull);
verify(() => client.patch(path, data: { verify(() => client.patch(path, data: {
'set': { 'set': set,
'cooldown': cooldown,
},
})).called(1); })).called(1);
verifyNoMoreInteractions(client); verifyNoMoreInteractions(client);
}); });