Skip to content

Commit

Permalink
Mock openAndTruncateStream instead of getStream in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Stypox committed Nov 27, 2024
1 parent b21981a commit e31a8ad
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e31a8ad

Please sign in to comment.