mirror of
https://github.com/tuskyapp/Tusky
synced 2024-12-22 06:55:53 +01:00
fix tests
This commit is contained in:
parent
f630da2ab2
commit
59982a05b4
@ -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 */
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user