feat: Replace isSuccessful with canSend

This commit is contained in:
2023-06-17 20:58:33 +02:00
parent 65c0975a77
commit fe2b090ea0
3 changed files with 14 additions and 8 deletions

View File

@@ -881,7 +881,7 @@ void main() {
),
);
expect(aliceResult.isSuccess(1), isFalse);
expect(aliceResult.canSend, isFalse);
expect(aliceResult.deviceEncryptionErrors[bobJid]!.length, 1);
final error = aliceResult.deviceEncryptionErrors[bobJid]!.first;
expect(error.error, const TypeMatcher<NoKeyMaterialAvailableError>());
@@ -933,7 +933,7 @@ void main() {
),
);
expect(aliceResult.isSuccess(2), isFalse);
expect(aliceResult.canSend, isFalse);
expect(aliceResult.deviceEncryptionErrors[cocoJid]!.length, 1);
expect(
aliceResult.deviceEncryptionErrors[cocoJid]!.first.error,
@@ -1023,7 +1023,7 @@ void main() {
messageText,
),
);
expect(bobResponseMessage.isSuccess(1), isTrue);
expect(bobResponseMessage.canSend, isTrue);
final aliceReceivedMessage = await aliceManager.onIncomingStanza(
OmemoIncomingStanza(