Extract settings file deletion
This commit is contained in:
parent
122e80fae9
commit
af119db1d7
3 changed files with 25 additions and 17 deletions
|
|
@ -65,6 +65,26 @@ class ContentSettingsManagerTest {
|
|||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Settings file must be deleted`() {
|
||||
val settings = File.createTempFile("newpipe_", "")
|
||||
`when`(fileLocator.settings).thenReturn(settings)
|
||||
|
||||
ContentSettingsManager(fileLocator).deleteSettingsFile()
|
||||
|
||||
assertFalse(settings.exists())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Deleting settings file must do nothing if none exist`() {
|
||||
val settings = File("non_existent")
|
||||
`when`(fileLocator.settings).thenReturn(settings)
|
||||
|
||||
ContentSettingsManager(fileLocator).deleteSettingsFile()
|
||||
|
||||
assertFalse(settings.exists())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `The database must be extracted from the zip file`() {
|
||||
val db = File.createTempFile("newpipe_", "")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue