mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
first tests
This commit is contained in:
parent
e1a7910443
commit
9c2212e7f3
@ -26,6 +26,7 @@ import { bobBaumeister } from '@/seeds/users/bob-baumeister'
|
||||
import { garrickOllivander } from '@/seeds/users/garrick-ollivander'
|
||||
import { peterLustig } from '@/seeds/users/peter-lustig'
|
||||
import { stephenHawking } from '@/seeds/users/stephen-hawking'
|
||||
import { sendTransactionsToDltConnector } from './util/sendTransactionsToDltConnector'
|
||||
|
||||
let mutate: ApolloServerTestClient['mutate'], con: Connection
|
||||
let query: ApolloServerTestClient['query']
|
||||
@ -382,6 +383,46 @@ describe('send coins', () => {
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
it('creates the SEND dlt-transactions', async () => {
|
||||
const transaction = await Transaction.find({
|
||||
where: {
|
||||
userId: user[0].id,
|
||||
},
|
||||
relations: ['dltTransaction'],
|
||||
})
|
||||
|
||||
expect(transaction[0].dltTransaction).toEqual({
|
||||
id: expect.any(Number),
|
||||
transactionId: transaction[0].id,
|
||||
messageId: null,
|
||||
verified: false,
|
||||
createdAt: expect.any(Date),
|
||||
verifiedAt: null,
|
||||
})
|
||||
})
|
||||
|
||||
it('creates the RECEIVED dlt-transactions', async () => {
|
||||
const transaction = await Transaction.find({
|
||||
where: {
|
||||
userId: user[1].id,
|
||||
},
|
||||
relations: ['dltTransaction'],
|
||||
})
|
||||
|
||||
expect(transaction[0].dltTransaction).toEqual({
|
||||
id: expect.any(Number),
|
||||
transactionId: transaction[0].id,
|
||||
messageId: null,
|
||||
verified: false,
|
||||
createdAt: expect.any(Date),
|
||||
verifiedAt: null,
|
||||
})
|
||||
})
|
||||
|
||||
it.skip('invokes sendTransactionsToDltConnector', () => {
|
||||
expect(sendTransactionsToDltConnector).toBeCalled()
|
||||
})
|
||||
})
|
||||
|
||||
describe('send coins via gradido ID', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user