Skip to content

Commit

Permalink
add ledgers query test
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-rogobete committed Jun 28, 2020
1 parent 00e6c77 commit 4414b7d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/query_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,16 @@ void main() {
.execute();
assert(effects.length > 0);
});

test('test query ledgers', () async {

Page<LedgerResponse> ledgersPage =
await sdk.ledgers.limit(1).order(RequestBuilderOrder.DESC).execute();
assert(ledgersPage.records.length == 1);
LedgerResponse ledger = ledgersPage.records.first;

LedgerResponse ledger2 = await sdk.ledgers.ledger(ledger.sequence);
assert(ledger.sequence == ledger2.sequence);

});
}

0 comments on commit 4414b7d

Please sign in to comment.