@@ -2,7 +2,7 @@ package io.github.smaugfm.monobudget.integration.util
2
2
3
3
import io.github.oshai.kotlinlogging.KotlinLogging
4
4
import io.github.smaugfm.lunchmoney.api.LunchmoneyApi
5
- import io.github.smaugfm.lunchmoney.model.LunchmoneyCategoryMultiple
5
+ import io.github.smaugfm.lunchmoney.model.LunchmoneyCategory
6
6
import io.github.smaugfm.lunchmoney.model.LunchmoneyInsertTransaction
7
7
import io.github.smaugfm.lunchmoney.model.LunchmoneyTransaction
8
8
import io.github.smaugfm.lunchmoney.response.LunchmoneyUpdateTransactionResponse
@@ -35,6 +35,8 @@ import kotlinx.coroutines.cancel
35
35
import kotlinx.coroutines.flow.MutableSharedFlow
36
36
import kotlinx.coroutines.launch
37
37
import kotlinx.coroutines.runBlocking
38
+ import kotlinx.datetime.Clock
39
+ import kotlinx.datetime.toJavaInstant
38
40
import org.junit.jupiter.api.assertThrows
39
41
import org.koin.core.KoinApplication
40
42
import org.koin.dsl.bind
@@ -65,7 +67,7 @@ abstract class IntegrationTestBase : TestBase(), CoroutineScope {
65
67
66
68
@MockK
67
69
lateinit var categoriesFetcherMock:
68
- PeriodicFetcherFactory .PeriodicFetcher <List <LunchmoneyCategoryMultiple >>
70
+ PeriodicFetcherFactory .PeriodicFetcher <List <LunchmoneyCategory >>
69
71
70
72
@MockK
71
73
lateinit var budgetSettingsVerifier: BudgetSettingsVerifier
@@ -81,7 +83,7 @@ abstract class IntegrationTestBase : TestBase(), CoroutineScope {
81
83
every { lunchmoneyMock.getBudgetSummary(any(), any(), any()) } returns Mono .just(listOf ())
82
84
excludeRecords { lunchmoneyMock.getBudgetSummary(any(), any(), any()) }
83
85
every {
84
- periodicFetcherFactory.create<List <LunchmoneyCategoryMultiple >>(
86
+ periodicFetcherFactory.create<List <LunchmoneyCategory >>(
85
87
" Lunchmoney categories" ,
86
88
any(),
87
89
)
@@ -157,6 +159,14 @@ abstract class IntegrationTestBase : TestBase(), CoroutineScope {
157
159
notes = insertTransaction?.notes,
158
160
categoryId = insertTransaction?.categoryId,
159
161
status = insertTransaction!! .status!! ,
162
+ accountDisplayName = " " ,
163
+ createdAt = Clock .System .now().toJavaInstant(),
164
+ updatedAt = Clock .System .now().toJavaInstant(),
165
+ displayName = " " ,
166
+ excludeFromTotals = false ,
167
+ excludeFromBudget = false ,
168
+ isIncome = false ,
169
+ isPending = false ,
160
170
),
161
171
).transformDeferred(singleTransform)
162
172
}
@@ -173,6 +183,14 @@ abstract class IntegrationTestBase : TestBase(), CoroutineScope {
173
183
notes = insertTransaction2?.notes,
174
184
categoryId = insertTransaction2?.categoryId,
175
185
status = insertTransaction2!! .status!! ,
186
+ accountDisplayName = " " ,
187
+ createdAt = Clock .System .now().toJavaInstant(),
188
+ updatedAt = Clock .System .now().toJavaInstant(),
189
+ displayName = " " ,
190
+ excludeFromTotals = false ,
191
+ excludeFromBudget = false ,
192
+ isIncome = false ,
193
+ isPending = false ,
176
194
),
177
195
).transformDeferred(singleTransform)
178
196
}
@@ -243,6 +261,14 @@ abstract class IntegrationTestBase : TestBase(), CoroutineScope {
243
261
notes = insertTransaction?.notes,
244
262
categoryId = insertTransaction?.categoryId,
245
263
status = insertTransaction!! .status!! ,
264
+ accountDisplayName = " " ,
265
+ createdAt = Clock .System .now().toJavaInstant(),
266
+ updatedAt = Clock .System .now().toJavaInstant(),
267
+ displayName = " " ,
268
+ excludeFromTotals = false ,
269
+ excludeFromBudget = false ,
270
+ isIncome = false ,
271
+ isPending = false ,
246
272
),
247
273
).transformDeferred(singleTracker)
248
274
}
0 commit comments