|
@@ -1,5 +1,7 @@
|
1
|
1
|
#import <XCTest/XCTest.h>
|
|
2
|
+#import <OCMock/OCMock.h>
|
2
|
3
|
#import "RNNViewControllerPresenter.h"
|
|
4
|
+#import "UIViewController+RNNOptions.h"
|
3
|
5
|
|
4
|
6
|
@interface RNNViewControllerPresenterTest : XCTestCase
|
5
|
7
|
|
|
@@ -14,7 +16,7 @@
|
14
|
16
|
- (void)setUp {
|
15
|
17
|
[super setUp];
|
16
|
18
|
self.uut = [[RNNViewControllerPresenter alloc] init];
|
17
|
|
- self.bindedViewController = [UIViewController new];
|
|
19
|
+ self.bindedViewController = [OCMockObject partialMockForObject:[UIViewController new]];
|
18
|
20
|
[self.uut bindViewController:self.bindedViewController];
|
19
|
21
|
self.options = [[RNNNavigationOptions alloc] initEmptyOptions];
|
20
|
22
|
}
|
|
@@ -50,4 +52,11 @@
|
50
|
52
|
XCTAssertFalse(self.bindedViewController.navigationItem.hidesBackButton);
|
51
|
53
|
}
|
52
|
54
|
|
|
55
|
+- (void)testApplyOptions_drawBehindTabBarTrueWhenVisibleFalse {
|
|
56
|
+ self.options.bottomTabs.visible = [[Bool alloc] initWithValue:@(0)];
|
|
57
|
+ [[(id)self.bindedViewController expect] rnn_setDrawBehindTabBar:YES];
|
|
58
|
+ [self.uut applyOptions:self.options];
|
|
59
|
+ [(id)self.bindedViewController verify];
|
|
60
|
+}
|
|
61
|
+
|
53
|
62
|
@end
|