parent
2853215bf3
commit
babd06c1f8
2 changed files with 6 additions and 0 deletions
|
|
@ -267,6 +267,8 @@ static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) {
|
|||
#endif
|
||||
|
||||
- (id)initWithRequest:(NSURLRequest *)urlRequest {
|
||||
NSParameterAssert(urlRequest);
|
||||
|
||||
self = [super init];
|
||||
if (!self) {
|
||||
return nil;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,10 @@
|
|||
|
||||
#pragma mark -
|
||||
|
||||
- (void)testInitWithNilRequestRaisesException {
|
||||
expect(^{ (void)[[AFURLConnectionOperation alloc] initWithRequest:nil]; }).to.raiseAny();
|
||||
}
|
||||
|
||||
- (void)testThatAFURLConnectionOperationInvokesWillSendRequestForAuthenticationChallengeBlock {
|
||||
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"/path" relativeToURL:self.baseURL]];
|
||||
AFURLConnectionOperation *operation = [[AFURLConnectionOperation alloc] initWithRequest:request];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue