fix(worklist): skattekonto count-test tidsbomb (förfallodatum passerat) #14
@@ -806,9 +806,9 @@ describe('listSkattekontoPaymentDue', () => {
|
||||
enqueue({ data: null })
|
||||
enqueue({ data: company })
|
||||
enqueue({ data: null })
|
||||
await expect(countSkattekontoPaymentDue(supabase, COMPANY)).resolves.toBe(1)
|
||||
await expect(countSkattekontoPaymentDue(supabase, COMPANY, TODAY)).resolves.toBe(1)
|
||||
enqueue({ data: [] })
|
||||
enqueue({ data: null })
|
||||
await expect(countSkattekontoPaymentDue(supabase, COMPANY)).resolves.toBe(0)
|
||||
await expect(countSkattekontoPaymentDue(supabase, COMPANY, TODAY)).resolves.toBe(0)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -828,8 +828,9 @@ export async function listSkattekontoPaymentDue(
|
||||
export async function countSkattekontoPaymentDue(
|
||||
supabase: SupabaseClient,
|
||||
companyId: string,
|
||||
today: string = todayIsoStockholm(),
|
||||
): Promise<number> {
|
||||
return (await listSkattekontoPaymentDue(supabase, companyId)) ? 1 : 0
|
||||
return (await listSkattekontoPaymentDue(supabase, companyId, today)) ? 1 : 0
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user