diff options
| author | Stephen Blott | 2015-05-04 06:35:22 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-05-04 09:49:27 +0100 |
| commit | 136b132c81ae4f7a3b296109427fd757ca05dacf (patch) | |
| tree | 6e0a60512017799e78c22627ed3763b60ef6bd9c /tests/unit_tests | |
| parent | 776f617ece5d333fe70df903982a18d65fc2776a (diff) | |
| download | vimium-136b132c81ae4f7a3b296109427fd757ca05dacf.tar.bz2 | |
Search completion; tweak scoring and synchronization.
Diffstat (limited to 'tests/unit_tests')
| -rw-r--r-- | tests/unit_tests/completion_test.coffee | 4 | ||||
| -rw-r--r-- | tests/unit_tests/settings_test.coffee | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit_tests/completion_test.coffee b/tests/unit_tests/completion_test.coffee index 39437b52..56fcc456 100644 --- a/tests/unit_tests/completion_test.coffee +++ b/tests/unit_tests/completion_test.coffee @@ -239,10 +239,10 @@ context "search engines", setup -> searchEngines = "foo: bar?q=%s\n# comment\nbaz: qux?q=%s baz description" Settings.set 'searchEngines', searchEngines - @completer = new CustomSearchEngineCompleter() + @completer = new SearchEngineCompleter() # note, I couldn't just call @completer.refresh() here as I couldn't set root.Settings without errors # workaround is below, would be good for someone that understands the testing system better than me to improve - @completer.searchEngines = CustomSearchEngineCompleter.getSearchEngines() + @completer.searchEngines = SearchEngineCompleter.getSearchEngines() should "return search engine suggestion without description", -> results = filterCompleter(@completer, ["foo", "hello"]) diff --git a/tests/unit_tests/settings_test.coffee b/tests/unit_tests/settings_test.coffee index a67b69fa..346c98da 100644 --- a/tests/unit_tests/settings_test.coffee +++ b/tests/unit_tests/settings_test.coffee @@ -73,7 +73,7 @@ context "settings", should "set search engines, retrieve them correctly and check that they have been parsed correctly", -> searchEngines = "foo: bar?q=%s\n# comment\nbaz: qux?q=%s baz description" Settings.set 'searchEngines', searchEngines - result = CustomSearchEngineCompleter.getSearchEngines() + result = SearchEngineCompleter.getSearchEngines() assert.equal Object.keys(result).length, 2 assert.equal "bar?q=%s", result["foo"].url assert.isFalse result["foo"].description |
