More list view tests

This commit is contained in:
Max Lynch
2013-11-22 10:50:40 -06:00
parent 0d5bd759a1
commit 25ad241910
3 changed files with 15 additions and 3 deletions

View File

@@ -24889,6 +24889,8 @@ angular.module('ionic.ui.list', ['ngAnimate'])
}
});
$scope.listView = lv;
if($attr.refreshComplete) {
$scope.refreshComplete = function() {
lv.doneRefreshing();

View File

@@ -201,6 +201,8 @@ angular.module('ionic.ui.list', ['ngAnimate'])
}
});
$scope.listView = lv;
if($attr.refreshComplete) {
$scope.refreshComplete = function() {
lv.doneRefreshing();

View File

@@ -1,11 +1,19 @@
describe('Ionic List', function() {
var modal, q;
var compile, scope;
beforeEach(module('ionic.ui.list'));
beforeEach(function() {
});
beforeEach(inject(function($compile, $rootScope, $controller) {
compile = $compile;
scope = $rootScope;
}));
it('Should init', function() {
element = compile('<list>' +
'<list-item></list-item>' +
'<list-item></list-item>' +
'</list>')(scope);
expect(element.children().length).toBe(2);
});
});