Skip to content

Instantly share code, notes, and snippets.

@ErikEvenson
Created October 3, 2012 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ErikEvenson/3829115 to your computer and use it in GitHub Desktop.
Save ErikEvenson/3829115 to your computer and use it in GitHub Desktop.
RKPathMatcher Test
- (void)testAddedTest
{
NSDictionary *arguments = nil;
RKPathMatcher *pathMatcher = [RKPathMatcher pathMatcherWithPattern:@"/api/v1/organizations"];
BOOL isMatchingPattern = [pathMatcher matchesPath:@"/api/v1/organizations?name__icontains=t" tokenizeQueryStrings:YES parsedArguments:&arguments];
assertThatBool(isMatchingPattern, is(equalToBool(YES)));
assertThat(arguments, isNot(empty()));
assertThat(arguments, hasEntries(@"name__icontains", @"t",nil));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment