Example #1
0
 it('success', async () => {
   const schema1 = await schemaCreate()
   const data1 = await schema1.serialize()
   const schema2 = await Schema.deserialize(data1)
   assert.equal(schema2.sourceId, schema1.sourceId)
   const data2 = await schema2.serialize()
   assert.deepEqual(data1, data2)
 })
Example #2
0
 it('success', async () => {
   const schema = await schemaCreate()
   const serialized = await schema.serialize()
   assert.ok(serialized)
   assert.property(serialized, 'version')
   assert.property(serialized, 'data')
   const { data, version } = serialized
   assert.ok(data)
   assert.ok(version)
   assert.equal(data.source_id, schema.sourceId)
 })
Example #3
0
 it('success', async () => {
   await schemaCreate()
 })
Example #4
0
 it('success', async () => {
   const schema = await schemaCreate()
   const paymentTxn = await schema.paymentManager.getPaymentTxn()
   validatePaymentTxn(paymentTxn)
 })
Example #5
0
 it('exists', async () => {
   const schema = await schemaCreate()
   assert.instanceOf(schema.paymentManager, SchemaPaymentManager)
   assert.equal(schema.paymentManager.handle, schema.handle)
 })