Commit 8fae249e authored by Thomas Lechauve's avatar Thomas Lechauve

Fix search method: remove clean list call

parent 2bb1d0e5
......@@ -55,7 +55,6 @@
hash[extracted.keys[k]] = result[k];
}
this.current = this.list[i][j];
this.clean(i + 1);
this.list[i][j].callback(hash);
}
j += 1;
......
......@@ -47,6 +47,7 @@ $(function () {
url2 = {'route': '#/new/path/1', 'param1': 'foo1'},
url3 = {'route': '#/new/path/1/foo', 'param1': 'foo1'},
spy = sinon.spy();
$.router.routes.add('#/new/path', 0, spy);
$.router.routes.add('#/new/path/:id', 1, spy);
$.router.routes.add('#/new/path/:id/:other', 2, spy);
......@@ -57,10 +58,12 @@ $(function () {
$.router.routes.search(url2);
delete url2.route;
$.extend(url2, {'id': '1'});
ok(spy.calledWith(url2));
$.router.routes.search(url3);
delete url3.route;
$.extend(url3, {'id': '1', 'other': 'foo'});
ok(spy.calledWith(url3));
ok(spy.calledThrice);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment