mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-18 16:44:32 +00:00
update killswitch disabled test
This commit is contained in:
parent
cdee218133
commit
dea3be904e
1 changed files with 6 additions and 17 deletions
|
@ -1581,7 +1581,7 @@ void main() {
|
||||||
|
|
||||||
final mockPrefs = MockPrefs();
|
final mockPrefs = MockPrefs();
|
||||||
when(mockPrefs.useTor).thenAnswer((_) => true);
|
when(mockPrefs.useTor).thenAnswer((_) => true);
|
||||||
when(mockPrefs.torKillswitch).thenAnswer((_) => true);
|
when(mockPrefs.torKillswitch).thenAnswer((_) => false);
|
||||||
when(mockPrefs.wifiOnly).thenAnswer((_) => false);
|
when(mockPrefs.wifiOnly).thenAnswer((_) => false);
|
||||||
final torService = MockTorService();
|
final torService = MockTorService();
|
||||||
when(torService.enabled).thenAnswer((_) => false);
|
when(torService.enabled).thenAnswer((_) => false);
|
||||||
|
@ -1596,23 +1596,12 @@ void main() {
|
||||||
torService: torService,
|
torService: torService,
|
||||||
);
|
);
|
||||||
|
|
||||||
bool didThrow = false;
|
|
||||||
try {
|
|
||||||
final result = await client.getTransaction(
|
final result = await client.getTransaction(
|
||||||
txHash: SampleGetTransactionData.txHash0,
|
txHash: SampleGetTransactionData.txHash0,
|
||||||
verbose: true,
|
verbose: true,
|
||||||
requestID: "some requestId");
|
requestID: "some requestId");
|
||||||
|
|
||||||
expect(result, SampleGetTransactionData.txData0);
|
expect(result, SampleGetTransactionData.txData0);
|
||||||
} catch (e) {
|
|
||||||
didThrow = true;
|
|
||||||
// expect(e, isNotA<Exception>());
|
|
||||||
// expect(
|
|
||||||
// e.toString(),
|
|
||||||
// isNot(equals(
|
|
||||||
// "Exception: Tor preference and killswitch set but Tor is not enabled, not connecting to ElectrumX")));
|
|
||||||
}
|
|
||||||
expect(didThrow, isFalse);
|
|
||||||
|
|
||||||
verify(mockPrefs.wifiOnly).called(1);
|
verify(mockPrefs.wifiOnly).called(1);
|
||||||
verify(mockPrefs.useTor).called(1);
|
verify(mockPrefs.useTor).called(1);
|
||||||
|
|
Loading…
Reference in a new issue