fix warnings in test runs (#4340)

Found while working on #4026 but not directly related.

Two cases of unmocked methods and one of unclosed resource.
This commit is contained in:
Konrad Pozniak 2024-03-28 09:13:05 +01:00 committed by GitHub
commit b85ada930b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 1 deletions

View file

@ -18,6 +18,7 @@ import com.keylesspalace.tusky.entity.Notification
import com.keylesspalace.tusky.entity.TimelineAccount
import java.util.Date
import kotlinx.coroutines.test.TestScope
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Before
@ -60,6 +61,11 @@ class MainActivityTest {
WorkManagerTestInitHelper.initializeTestWorkManager(context)
}
@After
fun teardown() {
WorkManagerTestInitHelper.closeWorkDatabase()
}
@Test
fun `clicking notification of type FOLLOW shows notification tab`() {
val intent = showNotification(Notification.Type.FOLLOW)