aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorStephen Blott2015-05-29 06:43:19 +0100
committerStephen Blott2015-05-29 06:43:19 +0100
commit42fa6e9506d95073e0ca6924b1b9a082d23bd483 (patch)
treeeb9e526f6f57ab4e49ff9e0579d26a9c648df521 /tests
parent67e012f2c9de903deeaa5ade730161665a0bf430 (diff)
parent45157bc460494503ca2b90caa762e72d224a1ef3 (diff)
downloadvimium-42fa6e9506d95073e0ca6924b1b9a082d23bd483.tar.bz2
Merge branch 'completion-on-custom-search-only' into completion-on-custom-search-only-merge
Conflicts: background_scripts/completion.coffee
Diffstat (limited to 'tests')
-rw-r--r--tests/unit_tests/completion_test.coffee8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit_tests/completion_test.coffee b/tests/unit_tests/completion_test.coffee
index 88df0a43..4a0cf746 100644
--- a/tests/unit_tests/completion_test.coffee
+++ b/tests/unit_tests/completion_test.coffee
@@ -244,7 +244,7 @@ context "suggestions",
url: "url"
title: "title <span>"
relevancyFunction: returns 1
- assert.isTrue suggestion.generateHtml().indexOf("title &lt;span&gt;") >= 0
+ assert.isTrue suggestion.generateHtml({}).indexOf("title &lt;span&gt;") >= 0
should "highlight query words", ->
suggestion = new Suggestion
@@ -254,7 +254,7 @@ context "suggestions",
title: "ninjawords"
relevancyFunction: returns 1
expected = "<span class='vomnibarMatch'>ninj</span>a<span class='vomnibarMatch'>words</span>"
- assert.isTrue suggestion.generateHtml().indexOf(expected) >= 0
+ assert.isTrue suggestion.generateHtml({}).indexOf(expected) >= 0
should "highlight query words correctly when whey they overlap", ->
suggestion = new Suggestion
@@ -264,7 +264,7 @@ context "suggestions",
title: "ninjawords"
relevancyFunction: returns 1
expected = "<span class='vomnibarMatch'>ninjaword</span>s"
- assert.isTrue suggestion.generateHtml().indexOf(expected) >= 0
+ assert.isTrue suggestion.generateHtml({}).indexOf(expected) >= 0
should "shorten urls", ->
suggestion = new Suggestion
@@ -273,7 +273,7 @@ context "suggestions",
url: "http://ninjawords.com"
title: "ninjawords"
relevancyFunction: returns 1
- assert.equal -1, suggestion.generateHtml().indexOf("http://ninjawords.com")
+ assert.equal -1, suggestion.generateHtml({}).indexOf("http://ninjawords.com")
context "RankingUtils.wordRelevancy",
should "score higher in shorter URLs", ->