Added check for isEncrypted == false as encrypted messages don't have a (readable) message body

This commit is contained in:
dankito 2024-11-28 02:19:32 +01:00
parent 4deaf9cb21
commit 2c8f4ec050
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ class EmailsFetcherTest {
assertThat(result.overallError).isNull()
assertThat(result.emails).isNotEmpty()
val emailsWithoutBody = result.emails.filter { it.plainTextOrHtmlBody == null }
val emailsWithoutBody = result.emails.filter { it.plainTextOrHtmlBody == null && it.isEncrypted == false }
assertThat(emailsWithoutBody).isEmpty()
}