summaryrefslogtreecommitdiffstats
path: root/test/events/inputSpec.js
blob: 7f7282dd597f365eb92d4a98af1f9e7b4fd10cd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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();
	});
});