summaryrefslogtreecommitdiffstats
path: root/test/api/gotoSpec.js
diff options
context:
space:
mode:
authorVladislav Zarakovsky <vlad.zar@gmail.com>2016-03-13 12:12:25 +0300
committerVladislav Zarakovsky <vlad.zar@gmail.com>2016-03-13 12:12:25 +0300
commit42d8bc547ca5f6894fa6b96194ed7271a9256693 (patch)
tree5c0edb278eb73e736dfe96b9eaba3c33caed9eaf /test/api/gotoSpec.js
parenta8823bd996e7e2b713991a75b8fe267994b34981 (diff)
downloadawesomplete-42d8bc547ca5f6894fa6b96194ed7271a9256693.zip
awesomplete-42d8bc547ca5f6894fa6b96194ed7271a9256693.tar.gz
awesomplete-42d8bc547ca5f6894fa6b96194ed7271a9256693.tar.bz2
Pass suggestion item to awesomplete-selectcomplete and awesomplete-highlight events
Diffstat (limited to 'test/api/gotoSpec.js')
-rw-r--r--test/api/gotoSpec.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/api/gotoSpec.js b/test/api/gotoSpec.js
index fd7c242..dedf779 100644
--- a/test/api/gotoSpec.js
+++ b/test/api/gotoSpec.js
@@ -33,7 +33,11 @@ describe("awesomplete.goto", function () {
var handler = $.spyOnEvent(this.subject.input, "awesomplete-highlight");
this.subject.goto(1);
- expect(handler).toHaveBeenCalled();
+ expect(handler).toHaveBeenCalledWith(
+ jasmine.objectContaining({
+ text: jasmine.objectContaining({ label: "item2", value: "item2" })
+ })
+ );
});
describe("with item index > -1", function () {