Mock openAndTruncateStream instead of getStream in test

This commit is contained in:
Stypox 2024-11-27 16:37:25 +01:00
parent 7e4cf82b9d
commit fb1fe7f85a

View file

@ -55,7 +55,7 @@ class ImportExportManagerTest {
`when`(sharedPreferences.all).thenReturn(expectedPreferences)
val output = File.createTempFile("newpipe_", "")
`when`(storedFileHelper.stream).thenReturn(FileStream(output))
`when`(storedFileHelper.openAndTruncateStream()).thenReturn(FileStream(output))
ImportExportManager(fileLocator).exportDatabase(sharedPreferences, storedFileHelper)
val zipFile = ZipFile(output)