diff options
-rw-r--r-- | spec/javascripts/shortcuts_issuable_spec.js | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/spec/javascripts/shortcuts_issuable_spec.js b/spec/javascripts/shortcuts_issuable_spec.js index 7c577cc1b38..3f7f6cf0113 100644 --- a/spec/javascripts/shortcuts_issuable_spec.js +++ b/spec/javascripts/shortcuts_issuable_spec.js @@ -50,13 +50,8 @@ require('~/shortcuts_issuable'); return expect(triggered).toBe(true); }); return it('triggers `focus`', function() { - var focused; - focused = false; - $(this.selector).on('focus', function() { - return focused = true; - }); this.shortcut.replyWithSelectedText(); - return expect(focused).toBe(true); + expect(document.activeElement).toBe(document.querySelector(this.selector)); }); }); describe('with a one-line selection', function() { |