Merge branch '1064_parameter_assert' of https://github.com/kylef/AFNetworking into kylef-1064_parameter_assert
This commit is contained in:
commit
1e205bc199
2 changed files with 6 additions and 0 deletions
|
|
@ -267,6 +267,8 @@ static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
- (id)initWithRequest:(NSURLRequest *)urlRequest {
|
- (id)initWithRequest:(NSURLRequest *)urlRequest {
|
||||||
|
NSParameterAssert(urlRequest);
|
||||||
|
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (!self) {
|
if (!self) {
|
||||||
return nil;
|
return nil;
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,10 @@
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
||||||
|
- (void)testInitWithNilRequestRaisesException {
|
||||||
|
expect(^{ (void)[[AFURLConnectionOperation alloc] initWithRequest:nil]; }).to.raiseAny();
|
||||||
|
}
|
||||||
|
|
||||||
- (void)testThatAFURLConnectionOperationInvokesWillSendRequestForAuthenticationChallengeBlock {
|
- (void)testThatAFURLConnectionOperationInvokesWillSendRequestForAuthenticationChallengeBlock {
|
||||||
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"/path" relativeToURL:self.baseURL]];
|
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"/path" relativeToURL:self.baseURL]];
|
||||||
AFURLConnectionOperation *operation = [[AFURLConnectionOperation alloc] initWithRequest:request];
|
AFURLConnectionOperation *operation = [[AFURLConnectionOperation alloc] initWithRequest:request];
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue