1
0
mirror of https://github.com/tuskyapp/Tusky synced 2024-12-22 06:55:53 +01:00

fix tests

This commit is contained in:
Conny Duck 2024-10-08 20:50:45 +02:00
parent f630da2ab2
commit 59982a05b4
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -149,7 +149,7 @@ interface MastodonApi {
@Query("limit") limit: Int? = null,
/** Types to excludes from the results */
@Query("exclude_types[]") excludes: Set<Notification.Type>? = null,
@Query("include_filtered") includeFiltered: Boolean
@Query("include_filtered") includeFiltered: Boolean = true
): Response<List<Notification>>
/** Fetch a single notification */

View File

@ -80,7 +80,7 @@ class NotificationsRemoteMediatorTest {
val remoteMediator = NotificationsRemoteMediator(
accountManager = accountManager,
api = mock {
onBlocking { notifications(anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull()) } doReturn Response.error(500, "".toResponseBody())
onBlocking { notifications(anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull()) } doReturn Response.error(500, "".toResponseBody())
},
db = db,
excludes = emptySet()
@ -99,7 +99,7 @@ class NotificationsRemoteMediatorTest {
val remoteMediator = NotificationsRemoteMediator(
accountManager = accountManager,
api = mock {
onBlocking { notifications(anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull()) } doThrow IOException()
onBlocking { notifications(anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull()) } doThrow IOException()
},
db = db,
excludes = emptySet()