diff options
Diffstat (limited to 'spec/javascripts/lib/utils/navigation_utility_spec.js')
-rw-r--r-- | spec/javascripts/lib/utils/navigation_utility_spec.js | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/spec/javascripts/lib/utils/navigation_utility_spec.js b/spec/javascripts/lib/utils/navigation_utility_spec.js deleted file mode 100644 index be620e4a27c..00000000000 --- a/spec/javascripts/lib/utils/navigation_utility_spec.js +++ /dev/null @@ -1,23 +0,0 @@ -import findAndFollowLink from '~/lib/utils/navigation_utility'; - -describe('findAndFollowLink', () => { - it('visits a link when the selector exists', () => { - const href = '/some/path'; - const visitUrl = spyOnDependency(findAndFollowLink, 'visitUrl'); - - setFixtures(`<a class="my-shortcut" href="${href}">link</a>`); - - findAndFollowLink('.my-shortcut'); - - expect(visitUrl).toHaveBeenCalledWith(href); - }); - - it('does not throw an exception when the selector does not exist', () => { - const visitUrl = spyOnDependency(findAndFollowLink, 'visitUrl'); - - // this should not throw an exception - findAndFollowLink('.this-selector-does-not-exist'); - - expect(visitUrl).not.toHaveBeenCalled(); - }); -}); |