Ox.URL: fix tests

This commit is contained in:
rolux 2013-02-27 16:38:51 +05:30
parent 89408bd4be
commit 49f7f011e9

View file

@ -10,7 +10,8 @@ Ox.URL <f> URL controller
getHash <f> Takes a state object and normalizes its "hash" property
(o) -> <o> State object
getItem <f> Tests if a string matches an item
(string, callback) -> <u> undefined
(type, string, callback) -> <u> undefined
type <s> type
string <s> The string to be tested
callback <f> callback function
id <s> Matching item id, or empty
@ -52,7 +53,7 @@ Ox.URL <f> URL controller
{id: 'name', type: 'string'},
{id: 'population', type: 'integer'}
],
getItem: function(str, callback) {
getItem: function(type, str, callback) {
callback(/^\d+$/.test(str) ? str : '');
},
getSpan: function(item, view, str, callback) {