mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Test that the updateContribution mutation updates the contribution with the right values.
This commit is contained in:
parent
9ee40767bb
commit
c6ae5760c3
@ -370,6 +370,32 @@ describe('ContributionResolver', () => {
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
describe('valid input', () => {
|
||||
it('updates contribution', async () => {
|
||||
await expect(
|
||||
mutate({
|
||||
mutation: updateContribution,
|
||||
variables: {
|
||||
contributionId: result.data.createContribution.id,
|
||||
amount: 10.0,
|
||||
memo: 'Test contribution',
|
||||
creationDate: new Date().toString(),
|
||||
},
|
||||
}),
|
||||
).resolves.toEqual(
|
||||
expect.objectContaining({
|
||||
data: {
|
||||
updateContribution: {
|
||||
id: result.data.createContribution.id,
|
||||
amount: '10',
|
||||
memo: 'Test contribution',
|
||||
},
|
||||
},
|
||||
}),
|
||||
)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -249,6 +249,7 @@ export const updateContribution = gql`
|
||||
memo: $memo
|
||||
creationDate: $creationDate
|
||||
) {
|
||||
id
|
||||
amount
|
||||
memo
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user