test(list): use timeout.flush()

This commit is contained in:
Andrew
2014-07-06 14:20:48 -06:00
parent ba56bb983f
commit 22a81fe82c
3 changed files with 3 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ describe('ionList directive', function() {
el.scope().$onReorder = jasmine.createSpy('$onReorder');
options.onReorder(el, 2, 3);
expect(el.scope().$onReorder).not.toHaveBeenCalled();
el.scope().$apply();
flush();
expect(el.scope().$onReorder).toHaveBeenCalledWith(2,3);
});