| 177 | it('should perform special navigation if specially asked for', () => { |
| 178 | const navigateSpy = env.sandbox.spy(); |
| 179 | const opt_navigate = (val) => { |
| 180 | navigateSpy(); |
| 181 | expect(val).to.equal( |
| 182 | 'https://cdn.ampproject.org/c/www.example.com/amp.html#click=' + |
| 183 | 'https%3A%2F%2Ftest.com%3Famp%3D1%26adurl%3Dhttps%253A%252F%252F' + |
| 184 | 'cdn.ampproject.org%252Fc%252Fwww.example.com%252Famp.html' |
| 185 | ); |
| 186 | }; |
| 187 | handleClick(event, opt_navigate); |
| 188 | expect(event.preventDefault).to.be.calledOnce; |
| 189 | expect(open).to.not.be.called; |