Permalink
Browse files

AUI-838 - Update unit tests

  • Loading branch information...
1 parent c7c3562 commit 6de7548e3812cc4b9a3544e87a0346095a0ed438 @ipeychev ipeychev committed Feb 18, 2013
Showing with 19 additions and 2 deletions.
  1. +19 −2 tests/aui-search-ternary-search-tree/unit/test.js
@@ -99,10 +99,10 @@ AUI(
{
name: 'Test TST Prefixes',
- assertPrefixEquals: function(prefix, expected) {
+ assertPrefixEquals: function(prefix, expected, caseInsensitive) {
var instance = this;
- var words = tstree.prefixSearch(prefix);
+ var words = tstree.prefixSearch(prefix, caseInsensitive);
return checkArrays(expected, words);
},
@@ -136,6 +136,23 @@ AUI(
);
A.Assert.isTrue(result, 'Prefix Search on: ' + prefix + ' failed');
+ },
+
+ testPrefixSearchCaseInsensitive: function() {
+ var instance = this;
+
+ var prefix = 'EL';
+
+ var result = instance.assertPrefixEquals(
+ prefix,
+ [
+ 'else',
+ 'elseif'
+ ],
+ true
+ );
+
+ A.Assert.isTrue(result, 'Prefix Search on: ' + prefix + ' failed');
}
}
);

0 comments on commit 6de7548

Please sign in to comment.