autocomplete-base-test.js revision 3ac28c674915e172d0465eea5b9678527c7e4993
var AutoComplete = Y.AutoComplete;
name: 'AutoComplete',
_should: {
error: {
'Initializer should require an inputNode': 'No input node specified.'
}
},
setUp: function () {
},
tearDown: function () {
delete this.ac;
delete this.inputNode;
},
// -- Initialization -------------------------------------------------------
'Initializer should accept an inputNode': function () {
},
'Initializer should require an inputNode': function () {
// Should fail.
new AutoComplete();
},
'Browser autocomplete should be off by default': function () {
},
'Browser autocomplete should be turned on when enabled': function () {
new AutoComplete({
allowBrowserAutocomplete: true
});
},
// -- Attributes -----------------------------------------------------------
'dataSource should only accept dataSource-like objects and null': function () {
var ds = {sendRequest: function () {}};
},
'inputNode should be writable only on init': function () {
},
'requestTemplate should be encodeURIComponent by default': function () {
},
'requestTemplate should accept a custom template function': function () {
return 'query: ' + query;
};
},
'requestTemplate should generate a template function when set to a string': function () {
},
'requestTemplate function should replace {query} with the URI-encoded query': function () {
var rt;
},
'requestTemplate function should replace \\{query} with the literal string {query}': function () {
}
}));