Change mutation to query amount and memo, check in test that amount and memo have the right values.

This commit is contained in:
elweyn 2022-06-29 13:31:57 +02:00
parent 70b22f3dbe
commit ba88599ca7
2 changed files with 8 additions and 2 deletions

View File

@ -110,7 +110,10 @@ describe('ContributionResolver', () => {
).resolves.toEqual(
expect.objectContaining({
data: {
createContribution: true,
createContribution: {
amount: '100',
memo: 'Test env contribution',
},
},
}),
)

View File

@ -233,6 +233,9 @@ export const deleteContributionLink = gql`
export const createContribution = gql`
mutation ($amount: Decimal!, $memo: String!, $creationDate: String!) {
createContribution(amount: $amount, memo: $memo, creationDate: $creationDate)
createContribution(amount: $amount, memo: $memo, creationDate: $creationDate) {
amount
memo
}
}
`