mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
Merge branch 'master' into 3030-feature-role-administration-backend
This commit is contained in:
commit
c66440e038
@ -221,24 +221,30 @@ describe('semaphore', () => {
|
||||
})
|
||||
|
||||
it('does throw error on second redeem call', async () => {
|
||||
const redeem1 = mutate({
|
||||
mutation: redeemTransactionLink,
|
||||
variables: {
|
||||
code: myCode,
|
||||
},
|
||||
})
|
||||
const redeem2 = mutate({
|
||||
mutation: redeemTransactionLink,
|
||||
variables: {
|
||||
code: myCode,
|
||||
},
|
||||
})
|
||||
await expect(redeem1).resolves.toMatchObject({
|
||||
errors: undefined,
|
||||
})
|
||||
await expect(redeem2).resolves.toMatchObject({
|
||||
errors: [new GraphQLError('Transaction link already redeemed')],
|
||||
})
|
||||
const result = await Promise.all([
|
||||
mutate({
|
||||
mutation: redeemTransactionLink,
|
||||
variables: {
|
||||
code: myCode,
|
||||
},
|
||||
}),
|
||||
mutate({
|
||||
mutation: redeemTransactionLink,
|
||||
variables: {
|
||||
code: myCode,
|
||||
},
|
||||
}),
|
||||
])
|
||||
expect(result).toContainEqual(
|
||||
expect.objectContaining({
|
||||
errors: [new GraphQLError('Transaction link already redeemed')],
|
||||
}),
|
||||
)
|
||||
expect(result).toContainEqual(
|
||||
expect.objectContaining({
|
||||
errors: undefined,
|
||||
}),
|
||||
)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -198,6 +198,7 @@ volumes:
|
||||
dht_node_modules:
|
||||
dht_database_node_modules:
|
||||
dht_database_build:
|
||||
dlt_connector_modules:
|
||||
federation_node_modules:
|
||||
federation_database_node_modules:
|
||||
federation_database_build:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user