mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 03:49:22 +00:00
update tests
This commit is contained in:
parent
4564ee7e0a
commit
5c2465784e
1 changed files with 5 additions and 17 deletions
|
@ -126,12 +126,8 @@ void main() {
|
||||||
).thenThrow(Exception());
|
).thenThrow(Exception());
|
||||||
|
|
||||||
final cachedClient = CachedElectrumX(
|
final cachedClient = CachedElectrumX(
|
||||||
electrumXClient: client,
|
electrumXClient: client,
|
||||||
port: 0,
|
);
|
||||||
failovers: [],
|
|
||||||
server: '',
|
|
||||||
useSSL: true,
|
|
||||||
prefs: Prefs.instance);
|
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
() async => await cachedClient.getTransaction(
|
() async => await cachedClient.getTransaction(
|
||||||
|
@ -143,12 +139,8 @@ void main() {
|
||||||
|
|
||||||
test("clearSharedTransactionCache", () async {
|
test("clearSharedTransactionCache", () async {
|
||||||
final cachedClient = CachedElectrumX(
|
final cachedClient = CachedElectrumX(
|
||||||
server: '',
|
electrumXClient: MockElectrumX(),
|
||||||
electrumXClient: MockElectrumX(),
|
);
|
||||||
port: 0,
|
|
||||||
useSSL: true,
|
|
||||||
prefs: MockPrefs(),
|
|
||||||
failovers: []);
|
|
||||||
|
|
||||||
bool didThrow = false;
|
bool didThrow = false;
|
||||||
try {
|
try {
|
||||||
|
@ -174,11 +166,7 @@ void main() {
|
||||||
useSSL: true,
|
useSSL: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final client = CachedElectrumX.from(
|
final client = CachedElectrumX.from(electrumXClient: MockElectrumX());
|
||||||
node: node,
|
|
||||||
prefs: MockPrefs(),
|
|
||||||
failovers: [],
|
|
||||||
electrumXClient: MockElectrumX());
|
|
||||||
|
|
||||||
expect(client, isA<CachedElectrumX>());
|
expect(client, isA<CachedElectrumX>());
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue