diff options
Diffstat (limited to 'test/events/inputSpec.js')
-rw-r--r-- | test/events/inputSpec.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/events/inputSpec.js b/test/events/inputSpec.js new file mode 100644 index 0000000..7f7282d --- /dev/null +++ b/test/events/inputSpec.js @@ -0,0 +1,17 @@ +describe("input event", function () { + + $.fixture("plain"); + + subject(function () { + return new Awesomplete("#plain", { list: ["item1", "item2", "item3"] }); + }); + + it("rebuilds the list", function () { + spyOn(Awesomplete.prototype, "evaluate"); + this.subject.input.focus(); + this.subject.open(); + + $.type(this.subject.input, "ite"); + expect(Awesomplete.prototype.evaluate).toHaveBeenCalled(); + }); +}); |