diff options
author | Vladislav Zarakovsky <vlad.zar@gmail.com> | 2015-11-24 14:15:31 +0300 |
---|---|---|
committer | Vladislav Zarakovsky <vlad.zar@gmail.com> | 2015-11-24 15:43:42 +0300 |
commit | c1c5e13f7f45e2264947890b5d81da234de2c937 (patch) | |
tree | 69c4f7916f62c898c6c8cef6372573fe8f123a61 | |
parent | 625cd571f784f75f7bc05e78606c5bd47de5f973 (diff) | |
download | awesomplete-c1c5e13f7f45e2264947890b5d81da234de2c937.zip awesomplete-c1c5e13f7f45e2264947890b5d81da234de2c937.tar.gz awesomplete-c1c5e13f7f45e2264947890b5d81da234de2c937.tar.bz2 |
input event tests
-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(); + }); +}); |