Skip to content

Commit e31a8ad

Browse files
committed
Mock openAndTruncateStream instead of getStream in test
1 parent b21981a commit e31a8ad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/src/test/java/org/schabi/newpipe/settings/ImportExportManagerTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class ImportExportManagerTest {
5555
`when`(sharedPreferences.all).thenReturn(expectedPreferences)
5656

5757
val output = File.createTempFile("newpipe_", "")
58-
`when`(storedFileHelper.stream).thenReturn(FileStream(output))
58+
`when`(storedFileHelper.openAndTruncateStream()).thenReturn(FileStream(output))
5959
ImportExportManager(fileLocator).exportDatabase(sharedPreferences, storedFileHelper)
6060

6161
val zipFile = ZipFile(output)

0 commit comments

Comments
 (0)