feat: typesafe query and more UI changes
This commit is contained in:
parent
d73bb88f1d
commit
64e358f61c
13 changed files with 1347 additions and 109 deletions
|
|
@ -293,4 +293,31 @@ describe('getAuthorizedStatus', () => {
|
|||
type: 'error',
|
||||
})
|
||||
})
|
||||
|
||||
it('should return rejected status for blocked custom info request', () => {
|
||||
const customer = {
|
||||
authorizedOverride: null,
|
||||
isSuspended: false,
|
||||
customInfoRequests: [
|
||||
{
|
||||
infoRequestId: '550e8400-e29b-41d4-a716-446655440000',
|
||||
override: 'blocked',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
const triggers = {
|
||||
automation: 'manual',
|
||||
overrides: [],
|
||||
}
|
||||
|
||||
const customRequests = [{ id: '550e8400-e29b-41d4-a716-446655440000' }]
|
||||
|
||||
const result = getAuthorizedStatus(customer, triggers, customRequests)
|
||||
|
||||
expect(result).toEqual({
|
||||
label: 'Rejected',
|
||||
type: 'error',
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue