|
@@ -36,7 +36,6 @@ describe('XRPIO', () => {
|
36
|
36
|
})
|
37
|
37
|
|
38
|
38
|
it('getAccountSequence', async function(){
|
39
|
|
- //this.skip()
|
40
|
39
|
this.timeout(10000)
|
41
|
40
|
const seq = await api.getAccountSequence(sendWallet.address)
|
42
|
41
|
expect(seq).to.exist
|
|
@@ -44,7 +43,7 @@ describe('XRPIO', () => {
|
44
|
43
|
})
|
45
|
44
|
|
46
|
45
|
it('estimateFee', async function () {
|
47
|
|
- this.timeout(2000)
|
|
46
|
+ this.timeout(10000)
|
48
|
47
|
const cost = await api.estimateFee(longText)
|
49
|
48
|
expect(cost).to.be.a('number')
|
50
|
49
|
expect(cost).to.be.lessThan(50)
|
|
@@ -53,7 +52,6 @@ describe('XRPIO', () => {
|
53
|
52
|
|
54
|
53
|
let txHash
|
55
|
54
|
it('writeRaw', async function(){
|
56
|
|
- //this.skip()
|
57
|
55
|
this.timeout(15000)
|
58
|
56
|
txHash = await api.writeRaw({data: TEST_DATA}, receiveWallet.address, sendWallet.secret);
|
59
|
57
|
expect(txHash).to.exist
|
|
@@ -61,13 +59,26 @@ describe('XRPIO', () => {
|
61
|
59
|
})
|
62
|
60
|
|
63
|
61
|
it('readRaw', async function () {
|
64
|
|
- //this.skip()
|
65
|
62
|
this.timeout(15000)
|
66
|
63
|
const memo = await api.readRaw(txHash)
|
67
|
64
|
expect(memo).to.exist
|
68
|
65
|
expect(memo.data).to.be.equal(TEST_DATA)
|
69
|
66
|
})
|
70
|
67
|
|
|
68
|
+ it('verifyOwner readRaw', async function (){
|
|
69
|
+ this.timeout(15000)
|
|
70
|
+ const memo = await api.readRaw(txHash, sendWallet.address)
|
|
71
|
+ expect(memo).to.exist
|
|
72
|
+ expect(memo.data).to.be.equal(TEST_DATA)
|
|
73
|
+ })
|
|
74
|
+
|
|
75
|
+ it('verifyOwner readRaw bad owner', function (done){
|
|
76
|
+ this.timeout(15000)
|
|
77
|
+ api.readRaw(txHash, "not the owner")
|
|
78
|
+ .then(_ => done(new Error('Expected error but succeeded')))
|
|
79
|
+ .catch(_ => done())
|
|
80
|
+ })
|
|
81
|
+
|
71
|
82
|
it('readRaw bad hash', function (done){
|
72
|
83
|
this.timeout(150000)
|
73
|
84
|
api.readRaw("123")
|
|
@@ -76,7 +87,6 @@ describe('XRPIO', () => {
|
76
|
87
|
})
|
77
|
88
|
|
78
|
89
|
it('treeWrite', async function(){
|
79
|
|
-// this.skip()
|
80
|
90
|
this.timeout(45000)
|
81
|
91
|
txHash = await api.treeWrite(longText, receiveWallet.address, sendWallet.secret)
|
82
|
92
|
expect(txHash).to.exist
|
|
@@ -84,15 +94,27 @@ describe('XRPIO', () => {
|
84
|
94
|
})
|
85
|
95
|
|
86
|
96
|
it('treeRead', async function(){
|
87
|
|
-// this.skip()
|
88
|
97
|
this.timeout(45000)
|
89
|
|
- txHash = await api.treeRead([txHash])
|
90
|
|
- expect(txHash).to.exist
|
91
|
|
- expect(txHash).to.be.equal(longText)
|
|
98
|
+ const data = await api.treeRead([txHash])
|
|
99
|
+ expect(data).to.exist
|
|
100
|
+ expect(data).to.be.equal(longText)
|
|
101
|
+ })
|
|
102
|
+
|
|
103
|
+ it('treeRead verify owner', async function(){
|
|
104
|
+ this.timeout(45000)
|
|
105
|
+ const data = await api.treeRead([txHash], sendWallet.address)
|
|
106
|
+ expect(data).to.exist
|
|
107
|
+ expect(data).to.be.equal(longText)
|
|
108
|
+ })
|
|
109
|
+
|
|
110
|
+ it('verifyOwner treeRead bad owner', function(done){
|
|
111
|
+ this.timeout(45000)
|
|
112
|
+ api.treeRead([txHash], "not the owner")
|
|
113
|
+ .then(_ => done(new Error('Expected error but succeeded')))
|
|
114
|
+ .catch(_ => done())
|
92
|
115
|
})
|
93
|
116
|
|
94
|
117
|
it('treeWrite XL', async function(){
|
95
|
|
- //this.skip()
|
96
|
118
|
this.timeout(450000)
|
97
|
119
|
txHash = await api.treeWrite(htmlTxt, receiveWallet.address, sendWallet.secret)
|
98
|
120
|
expect(txHash).to.exist
|
|
@@ -100,7 +122,6 @@ describe('XRPIO', () => {
|
100
|
122
|
})
|
101
|
123
|
|
102
|
124
|
it('treeRead XL', async function(){
|
103
|
|
- //this.skip()
|
104
|
125
|
this.timeout(450000)
|
105
|
126
|
const data = await api.treeRead([txHash])
|
106
|
127
|
expect(data).to.exist
|