From 015d6e0b631b841e84da6305dfbaaa445b951703 Mon Sep 17 00:00:00 2001 From: Abdourahamane Boinaidi Date: Thu, 10 Oct 2024 17:07:53 +0200 Subject: [PATCH] test: Can remove a transfer from database --- .../database/TransferControllerTest.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/STDatabase/src/commonTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/TransferControllerTest.kt b/STDatabase/src/commonTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/TransferControllerTest.kt index f6067ea4..221e4595 100644 --- a/STDatabase/src/commonTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/TransferControllerTest.kt +++ b/STDatabase/src/commonTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/TransferControllerTest.kt @@ -49,6 +49,13 @@ class TransferControllerTest { assertEquals(transfer.container.files.count(), realmTransfer.container?.files?.count()) } + @Test + fun canRemoveTransfers() = runTest { + transferController.upsert(DummyTransfer.transfer) + transferController.removeData() + assertEquals(0, transferController.getTransfers()?.count()) + } + @Test fun realmTransferListIsEmpty() { assertTrue(transferController.getTransfers()?.isEmpty() == true)