xctest - how to test if a new view loads on a button press

Viewed 5337

Just started xcode 5 and xctest. How do I test that a view loads on button press. I have programatically added method that gets called when the rightBarButtonItem is clicked

action:@selector(onSettingsButton)

and in onSettingsButton

-(void) onSettingsButton{
    SettingsViewController *svc = [[SettingsViewController alloc] init];
    [self.navigationController pushViewController:svc animated:YES];
}

How to write xctest to ensure SettingsViewController brings up the Settings view? Thank you.

2 Answers
Related