Skip to content

Commit

Permalink
fix: added new func test in data source
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitorbp committed Aug 6, 2024
1 parent b36cf5b commit fb04bf8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ class OCLocalTransferDataSourceTest {
}
}

@Test
fun `updateTransferSourcePath changes transfer source path correctly`() {

ocLocalTransferDataSource.updateTransferSourcePath(OC_TRANSFER.id!!, OC_TRANSFER.sourcePath!!)

verify(exactly = 1) {
transferDao.updateTransferSourcePath(OC_TRANSFER.id!!, OC_TRANSFER.sourcePath!!)
}
}

@Test
fun `updateTransferStorageDirectoryInLocalPath changes directory correctly`() {
val oldDirectory = "oldDirectory"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ val OC_TRANSFER = OCTransfer(
status = TransferStatus.TRANSFER_IN_PROGRESS,
localBehaviour = UploadBehavior.MOVE,
forceOverwrite = true,
createdBy = UploadEnqueuedBy.ENQUEUED_BY_USER
createdBy = UploadEnqueuedBy.ENQUEUED_BY_USER,
sourcePath = "/source/path",
)

0 comments on commit fb04bf8

Please sign in to comment.