|
@@ -44,19 +44,13 @@
|
44
|
44
|
XCTAssertTrue([_boundViewController.navigationBar.standardAppearance.backgroundColor isEqual:[UIColor redColor]]);
|
45
|
45
|
}
|
46
|
46
|
|
47
|
|
-- (void)testApplyOptionsBeforePoppingShouldSetLargeTitleForPoppingViewController {
|
|
47
|
+- (void)testApplyOptionsShouldSetLargeTitleVisible {
|
48
|
48
|
_options.topBar.largeTitle.visible = [[Bool alloc] initWithBOOL:YES];
|
49
|
49
|
|
50
|
|
- [self.uut applyOptionsBeforePopping:self.options];
|
|
50
|
+ [self.uut applyOptions:self.options];
|
51
|
51
|
XCTAssertTrue([[_boundViewController navigationBar] prefersLargeTitles]);
|
52
|
52
|
}
|
53
|
53
|
|
54
|
|
-- (void)testApplyOptionsBeforePoppingShouldSetDefaultLargeTitleFalseForPoppingViewController {
|
55
|
|
- _options.topBar.largeTitle.visible = nil;
|
56
|
|
- [self.uut applyOptionsBeforePopping:self.options];
|
57
|
|
- XCTAssertFalse([[_boundViewController navigationBar] prefersLargeTitles]);
|
58
|
|
-}
|
59
|
|
-
|
60
|
54
|
- (void)testApplyOptions_shouldSetBackButtonOnBoundViewController_withTitle {
|
61
|
55
|
Text* title = [[Text alloc] initWithValue:@"Title"];
|
62
|
56
|
self.options.topBar.backButton.title = title;
|
|
@@ -69,7 +63,8 @@
|
69
|
63
|
self.options.topBar.backButton.title = title;
|
70
|
64
|
self.options.topBar.backButton.showTitle = [[Bool alloc] initWithValue:@(0)];
|
71
|
65
|
[self.uut applyOptions:self.options];
|
72
|
|
- XCTAssertNil(self.boundViewController.viewControllers.firstObject.navigationItem.backBarButtonItem.title);
|
|
66
|
+ NSLog(@"%@", self.boundViewController.viewControllers.firstObject.navigationItem.backBarButtonItem.title);
|
|
67
|
+ XCTAssertTrue([self.boundViewController.viewControllers.firstObject.navigationItem.backBarButtonItem.title isEqualToString:@""]);
|
73
|
68
|
}
|
74
|
69
|
|
75
|
70
|
- (void)testApplyOptions_shouldSetBackButtonOnBoundViewController_withDefaultValues {
|