35 STAssertNotNil(resource, nil);
45 STAssertNotNil(resource, nil);
46 [resource destroyWithCompletionHandler:^(ARHTTPResponse *response, NSError *error) {
47 STAssertEquals([response code], (NSInteger)200, nil);
62 STAssertFalse(exists, nil);
66 STAssertTrue(exists, nil);
72 STAssertFalse(exists, nil);
73 STAssertEquals([response code], (NSInteger)404, nil);
74 STAssertEquals([error code], (NSInteger)ARResourceNotFoundErrorCode, nil);
81 STAssertFalse(exists, nil);
90 NSString *string = [[NSString alloc] initWithData:[response body] encoding:NSUTF8StringEncoding];
91 for (NSString *pattern in [NSArray arrayWithObjects:@"\"id\":6", @"\"name\":\"Joe\"", nil])
93 NSRegularExpression *re = [NSRegularExpression regularExpressionWithPattern:pattern options:0 error:NULL];
94 NSTextCheckingResult *firstMatch = [re firstMatchInString:string options:0 range:NSMakeRange(0, [string length])];
95 STAssertNotNil(firstMatch, @"%@ should find match in %@", pattern, string);