mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
changes requested
This commit is contained in:
parent
2ac94e1b47
commit
b64c080447
@ -108,7 +108,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
submitCreation() {
|
||||
// console.log('submitCreation', this.selected)
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: adminUpdateContribution,
|
||||
|
||||
@ -2152,39 +2152,6 @@ describe('ContributionResolver', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe.skip('user email does not match creation user', () => {
|
||||
it('throws an error', async () => {
|
||||
jest.clearAllMocks()
|
||||
await expect(
|
||||
mutate({
|
||||
mutation: adminUpdateContribution,
|
||||
variables: {
|
||||
id: creation ? creation.id : -1,
|
||||
amount: new Decimal(300),
|
||||
memo: 'Danke Bibi!',
|
||||
creationDate: creation
|
||||
? contributionDateFormatter(creation.contributionDate)
|
||||
: contributionDateFormatter(new Date()),
|
||||
},
|
||||
}),
|
||||
).resolves.toEqual(
|
||||
expect.objectContaining({
|
||||
errors: [
|
||||
new GraphQLError(
|
||||
'User of the pending contribution and send user does not correspond',
|
||||
),
|
||||
],
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
it('logs the error thrown', () => {
|
||||
expect(logger.error).toBeCalledWith(
|
||||
'User of the pending contribution and send user does not correspond',
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
describe('creation update is not valid', () => {
|
||||
// as this test has not clearly defined that date, it is a false positive
|
||||
it('throws an error', async () => {
|
||||
|
||||
@ -321,7 +321,6 @@ export class ContributionResolver {
|
||||
|
||||
const contributionToUpdate = await DbContribution.findOne({
|
||||
where: { id, confirmedAt: IsNull(), deniedAt: IsNull() },
|
||||
relations: ['user'],
|
||||
})
|
||||
|
||||
if (!contributionToUpdate) {
|
||||
@ -358,7 +357,7 @@ export class ContributionResolver {
|
||||
result.date = contributionToUpdate.contributionDate
|
||||
|
||||
await EVENT_ADMIN_CONTRIBUTION_UPDATE(
|
||||
contributionToUpdate.user,
|
||||
{ id: contributionToUpdate.userId } as DbUser,
|
||||
moderator,
|
||||
contributionToUpdate,
|
||||
amount,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user