summaryrefslogtreecommitdiffstats
path: root/test/static/replaceSpec.js
diff options
context:
space:
mode:
authorVladislav Zarakovsky <vlad.zar@gmail.com>2016-01-30 14:56:00 +0300
committerVladislav Zarakovsky <vlad.zar@gmail.com>2016-01-30 14:56:00 +0300
commitdd4db9083127c70e9e71822a9e75cdcf48e54601 (patch)
tree1ea93b704383233e0db3d523a5b133a298baff6d /test/static/replaceSpec.js
parent0248c50f059becf8f2af5fa7ef2147678c94451a (diff)
parent35fe8c1f187c7a8f9627142bac63dcc4ad054bf4 (diff)
downloadawesomplete-dd4db9083127c70e9e71822a9e75cdcf48e54601.zip
awesomplete-dd4db9083127c70e9e71822a9e75cdcf48e54601.tar.gz
awesomplete-dd4db9083127c70e9e71822a9e75cdcf48e54601.tar.bz2
Merge pull request #16834 from vlazar/feature/item-and-replace-tests
Tests for Awesomplete.ITEM and Awesomplete.REPLACE
Diffstat (limited to 'test/static/replaceSpec.js')
-rw-r--r--test/static/replaceSpec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/static/replaceSpec.js b/test/static/replaceSpec.js
new file mode 100644
index 0000000..4339ff2
--- /dev/null
+++ b/test/static/replaceSpec.js
@@ -0,0 +1,11 @@
+describe("Awesomplete.REPLACE", function () {
+
+ subject(function () { return Awesomplete.REPLACE });
+
+ def("instance", function() { return { input: { value: "initial" } } });
+
+ it("replaces input value", function () {
+ this.subject.call(this.instance, "JavaScript");
+ expect(this.instance.input.value).toBe("JavaScript");
+ });
+});