Skip to content

Commit

Permalink
match: updated with matchController:
Browse files Browse the repository at this point in the history
  • Loading branch information
jeslyvarghese committed Mar 29, 2014
1 parent 2d5f371 commit 1aca030
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions HHRouterExampleTests/HHRouterTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ - (void)testRoute
[[HHRouter shared] map:@"/user/:userId/story/" toControllerClass:[StoryListViewController class]];


XCTAssertEqualObjects([[[HHRouter shared] match:@"/story/2/"] class], [StoryViewController class]);
XCTAssertEqualObjects([[[HHRouter shared] match:@"/user/1/story/"] class], [StoryListViewController class]);
XCTAssertEqualObjects([[[HHRouter shared] matchController:@"/story/2/"] class], [StoryViewController class]);
XCTAssertEqualObjects([[[HHRouter shared] matchController:@"/user/1/story/"] class], [StoryListViewController class]);

XCTAssertEqualObjects([[[HHRouter shared] match:@"hhrouter://user/1/"] class], [UserViewController class]);
XCTAssertEqualObjects([[[HHRouter shared] matchController:@"hhrouter://user/1/"] class], [UserViewController class]);

UserViewController *userViewController = (UserViewController *) [[HHRouter shared] match:@"/user/1/?a=b&c=d"];
UserViewController *userViewController = (UserViewController *) [[HHRouter shared] matchController:@"/user/1/?a=b&c=d"];
XCTAssertEqualObjects(userViewController.params[@"route"], @"/user/1/?a=b&c=d");
XCTAssertEqualObjects(userViewController.params[@"userId"], @"1");
XCTAssertEqualObjects(userViewController.params[@"a"], @"b");
Expand Down

0 comments on commit 1aca030

Please sign in to comment.