summaryrefslogtreecommitdiffstats
path: root/test/static/allSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/static/allSpec.js')
-rw-r--r--test/static/allSpec.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/static/allSpec.js b/test/static/allSpec.js
new file mode 100644
index 0000000..59e23eb
--- /dev/null
+++ b/test/static/allSpec.js
@@ -0,0 +1,21 @@
+describe("Awesomplete.all", function () {
+
+ $.fixture("options");
+
+ subject(function () { return Awesomplete.all });
+
+ it("is empty initially", function () {
+ expect(this.subject.length).toBe(0);
+ });
+
+ it("keeps a list of created instances", function () {
+ var first = new Awesomplete("#with-data-list-inline");
+ expect(this.subject.length).toBe(1);
+ expect(this.subject).toContain(first);
+
+ var second = new Awesomplete("#with-data-list");
+ expect(this.subject.length).toBe(2);
+ expect(this.subject).toContain(first);
+ expect(this.subject).toContain(second);
+ });
+});