Get tests running.

pull/1/head
Matthew Chen 7 years ago
parent 32cf68bece
commit 53466386fd

@ -48,6 +48,10 @@ class VerifyingTSAccountManager: FailingTSAccountManager {
success() success()
} }
// TODO:
// override func updateAcountAttributes() -> Promise<Void> {
// return Promise(value: ())
// }
} }
class TokenObtainingTSAccountManager: VerifyingTSAccountManager { class TokenObtainingTSAccountManager: VerifyingTSAccountManager {

@ -23,8 +23,8 @@ NS_ASSUME_NONNULL_BEGIN
SetCurrentAppContext([TestAppContext new]); SetCurrentAppContext([TestAppContext new]);
[MockEnvironment activate];
[MockSSKEnvironment activate]; [MockSSKEnvironment activate];
[MockEnvironment activate];
} }
- (void)tearDown - (void)tearDown

@ -61,6 +61,12 @@ NS_ASSUME_NONNULL_BEGIN
OWSAssertIsOnMainThread(); OWSAssertIsOnMainThread();
OWSAssertDebug(block); OWSAssertDebug(block);
if (CurrentAppContext().isRunningTests) {
// We don't need to an any "on app ready" work
// in the tests.
return;
}
if (self.isAppReady) { if (self.isAppReady) {
block(); block();
return; return;
@ -93,6 +99,7 @@ NS_ASSUME_NONNULL_BEGIN
NSArray<AppReadyBlock> *appReadyBlocks = [self.appReadyBlocks copy]; NSArray<AppReadyBlock> *appReadyBlocks = [self.appReadyBlocks copy];
[self.appReadyBlocks removeAllObjects]; [self.appReadyBlocks removeAllObjects];
for (AppReadyBlock block in appReadyBlocks) { for (AppReadyBlock block in appReadyBlocks) {
block(); block();
} }

Loading…
Cancel
Save