mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-17 19:09:56 +00:00
Update tests for new method syntax
This commit is contained in:
parent
15582b7734
commit
a05e15463b
@ -129,14 +129,14 @@
|
||||
id <BITCrashManagerDelegate> delegateMock = mockProtocol(@protocol(BITCrashManagerDelegate));
|
||||
_sut.delegate = delegateMock;
|
||||
|
||||
assertThatBool([_sut handleUserInput:BITCrashManagerUserInputDontSend], equalToBool(YES));
|
||||
assertThatBool([_sut handleUserInput:BITCrashManagerUserInputDontSend crashMetaDescription:nil], equalToBool(YES));
|
||||
|
||||
[verify(delegateMock) crashManagerWillCancelSendingCrashReport:_sut];
|
||||
|
||||
}
|
||||
|
||||
- (void)testHandleUserInputSend {
|
||||
assertThatBool([_sut handleUserInput:BITCrashManagerUserInputSend], equalToBool(YES));
|
||||
assertThatBool([_sut handleUserInput:BITCrashManagerUserInputSend crashMetaDescription:nil], equalToBool(YES));
|
||||
}
|
||||
|
||||
- (void)testHandleUserInputAlwaysSend {
|
||||
@ -148,7 +148,7 @@
|
||||
[given([mockUserDefaults integerForKey:@"BITCrashManagerStatus"]) willReturn:nil];
|
||||
|
||||
//Test if method runs through
|
||||
assertThatBool([_sut handleUserInput:BITCrashManagerUserInputAlwaysSend], equalToBool(YES));
|
||||
assertThatBool([_sut handleUserInput:BITCrashManagerUserInputAlwaysSend crashMetaDescription:nil], equalToBool(YES));
|
||||
|
||||
//Test if correct CrashManagerStatus is now set
|
||||
[given([mockUserDefaults integerForKey:@"BITCrashManagerStauts"]) willReturnInt:BITCrashManagerStatusAutoSend];
|
||||
|
Loading…
x
Reference in New Issue
Block a user