forked from cerc-io/laconic-sdk
registry expiry tests
This commit is contained in:
parent
578ed5956e
commit
73af07c49f
@ -40,7 +40,7 @@ const nameserviceExpiryTests = () => {
|
|||||||
fee
|
fee
|
||||||
)
|
)
|
||||||
console.log("SetRecordResult: " + result.data.id)
|
console.log("SetRecordResult: " + result.data.id)
|
||||||
const [record] = await registry.queryRecords({ type: 'WebsiteRegistrationRecord', version: watcher.record.version }, true);
|
const [record] = await registry.queryRecords({ "type---": watcher.record.type, "version---": watcher.record.version }, true);
|
||||||
recordExpiryTime = new Date(record.expiryTime);
|
recordExpiryTime = new Date(record.expiryTime);
|
||||||
|
|
||||||
const [bond] = await registry.getBondsByIds([bondId]);
|
const [bond] = await registry.getBondsByIds([bondId]);
|
||||||
@ -63,7 +63,7 @@ const nameserviceExpiryTests = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('Check record expiry time', async() => {
|
test('Check record expiry time', async() => {
|
||||||
const [record] = await registry.queryRecords({ type: 'WebsiteRegistrationRecord', version: watcher.record.version }, true);
|
const [record] = await registry.queryRecords({ "type---": watcher.record.type, "version---": watcher.record.version }, true);
|
||||||
const updatedExpiryTime = new Date();
|
const updatedExpiryTime = new Date();
|
||||||
expect(updatedExpiryTime.getTime()).toBeGreaterThan(recordExpiryTime.getTime());
|
expect(updatedExpiryTime.getTime()).toBeGreaterThan(recordExpiryTime.getTime());
|
||||||
recordExpiryTime = updatedExpiryTime;
|
recordExpiryTime = updatedExpiryTime;
|
||||||
@ -88,7 +88,7 @@ const nameserviceExpiryTests = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('Check record deleted without bond balance', async() => {
|
test('Check record deleted without bond balance', async() => {
|
||||||
const records = await registry.queryRecords({ type: 'WebsiteRegistrationRecord', version: watcher.record.version }, true);
|
const records = await registry.queryRecords({ "type---": watcher.record.type, "version---": watcher.record.version }, true);
|
||||||
expect(records).toHaveLength(0);
|
expect(records).toHaveLength(0);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user