summaryrefslogtreecommitdiffstats
path: root/test/api/gotoSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/api/gotoSpec.js')
-rw-r--r--test/api/gotoSpec.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/api/gotoSpec.js b/test/api/gotoSpec.js
index 9e382c0..da96cf0 100644
--- a/test/api/gotoSpec.js
+++ b/test/api/gotoSpec.js
@@ -31,12 +31,10 @@ describe("awesomplete.goto", function () {
});
it("fires awesomplete-highlight event", function () {
- var events = { highlight: $.noop};
- spyOn(events, "highlight");
- $.on(this.subject.input, "awesomplete-highlight", events.highlight);
+ var handler = $.spyOnEvent(this.subject.input, "awesomplete-highlight");
this.subject.goto(1);
- expect(events.highlight).toHaveBeenCalled();
+ expect(handler).toHaveBeenCalled();
});
describe("with item index > -1", function () {