|
1 | 1 | import { incrementDailyArticleCount } from '../../lib/dailyArticleCount';
|
2 | 2 | import {
|
3 |
| - isIOS9, |
4 | 3 | isNPageOrHigherPageView,
|
5 | 4 | isValidContentType,
|
6 | 5 | isValidSection,
|
@@ -61,61 +60,6 @@ describe('SignInGate - displayRule methods', () => {
|
61 | 60 | });
|
62 | 61 | });
|
63 | 62 |
|
64 |
| - describe('isIOS9', () => { |
65 |
| - // spy on user agent to mock return value |
66 |
| - const userAgentGetter = jest.spyOn( |
67 |
| - window.navigator, |
68 |
| - 'userAgent', |
69 |
| - 'get', |
70 |
| - ); |
71 |
| - |
72 |
| - test('iphone ios9 is true', () => { |
73 |
| - userAgentGetter.mockReturnValueOnce( |
74 |
| - 'Mozilla/5.0 (iPhone; CPU OS 9_0 like Mac OS X) AppleWebKit/601.1.17 (KHTML, like Gecko) Version/8.0 Mobile/13A175 Safari/600.1.4', |
75 |
| - ); |
76 |
| - expect(isIOS9()).toBe(true); |
77 |
| - }); |
78 |
| - |
79 |
| - test('ipad ios9 is true', () => { |
80 |
| - userAgentGetter.mockReturnValueOnce( |
81 |
| - 'Mozilla/5.0 (iPad; CPU OS 9_0 like Mac OS X) AppleWebKit/601.1.17 (KHTML, like Gecko) Version/8.0 Mobile/13A175 Safari/600.1.4', |
82 |
| - ); |
83 |
| - expect(isIOS9()).toBe(true); |
84 |
| - }); |
85 |
| - |
86 |
| - test('ipod ios9 is true', () => { |
87 |
| - userAgentGetter.mockReturnValueOnce( |
88 |
| - 'Mozilla/5.0 (iPod; CPU OS 9_0 like Mac OS X) AppleWebKit/601.1.17 (KHTML, like Gecko) Version/8.0 Mobile/13A175 Safari/600.1.4', |
89 |
| - ); |
90 |
| - expect(isIOS9()).toBe(true); |
91 |
| - }); |
92 |
| - |
93 |
| - test('iphone not ios9 is false', () => { |
94 |
| - userAgentGetter.mockReturnValueOnce( |
95 |
| - 'Mozilla/5.0 (iPhone; CPU OS 10_3 like Mac OS X) AppleWebKit/601.1.17 (KHTML, like Gecko) Version/8.0 Mobile/13A175 Safari/600.1.4', |
96 |
| - ); |
97 |
| - expect(isIOS9()).toBe(false); |
98 |
| - }); |
99 |
| - |
100 |
| - test('ipad not ios9 is false', () => { |
101 |
| - userAgentGetter.mockReturnValueOnce( |
102 |
| - 'Mozilla/5.0 (iPad; CPU OS 8_1 like Mac OS X) AppleWebKit/601.1.17 (KHTML, like Gecko) Version/8.0 Mobile/13A175 Safari/600.1.4', |
103 |
| - ); |
104 |
| - expect(isIOS9()).toBe(false); |
105 |
| - }); |
106 |
| - |
107 |
| - test('ipod not ios9 is false', () => { |
108 |
| - userAgentGetter.mockReturnValueOnce( |
109 |
| - 'Mozilla/5.0 (iPod; CPU OS 7_0 like Mac OS X) AppleWebKit/601.1.17 (KHTML, like Gecko) Version/8.0 Mobile/13A175 Safari/600.1.4', |
110 |
| - ); |
111 |
| - expect(isIOS9()).toBe(false); |
112 |
| - }); |
113 |
| - |
114 |
| - test('not ios device is false', () => { |
115 |
| - expect(isIOS9()).toBe(false); |
116 |
| - }); |
117 |
| - }); |
118 |
| - |
119 | 63 | describe('isValidContentType', () => {
|
120 | 64 | test('is a valid type - article', () => {
|
121 | 65 | expect(isValidContentType('Article')).toBe(true);
|
|
0 commit comments