mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
Expect bound logs in time unit history test
This commit is contained in:
@@ -45,7 +45,16 @@ describe('GET /time-unit endpoints', () => {
|
||||
time_update_id: number
|
||||
tuid: number | null
|
||||
lower_buid: number | null
|
||||
lower_bound_update: { buid: number; updates: unknown[] } | null
|
||||
lower_bound_update: {
|
||||
buid: number
|
||||
updates: Array<{
|
||||
buid: number | null
|
||||
table_name: string | null
|
||||
column_name: string | null
|
||||
old_data: string | null
|
||||
new_data: string | null
|
||||
}>
|
||||
} | null
|
||||
}>
|
||||
}>('time-unit/langhian', 'GET')
|
||||
|
||||
@@ -58,7 +67,24 @@ describe('GET /time-unit endpoints', () => {
|
||||
lower_buid: 403,
|
||||
lower_bound_update: { buid: 403 },
|
||||
})
|
||||
expect(lowerBoundSummary?.lower_bound_update?.updates).toEqual([])
|
||||
expect(lowerBoundSummary?.lower_bound_update?.updates).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
buid: 403,
|
||||
table_name: 'now_tu_bound',
|
||||
column_name: 'b_name',
|
||||
old_data: 'Lan/Srv',
|
||||
new_data: 'Langhian/Serravallian',
|
||||
}),
|
||||
expect.objectContaining({
|
||||
buid: 403,
|
||||
table_name: 'now_tu_bound',
|
||||
column_name: 'age',
|
||||
old_data: '14.8',
|
||||
new_data: '13.82',
|
||||
}),
|
||||
])
|
||||
)
|
||||
})
|
||||
|
||||
it('handles unexpected failures gracefully', async () => {
|
||||
|
||||
Reference in New Issue
Block a user