Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 25ad241

Browse files
author
Max Lynch
committedNov 22, 2013
More list view tests
1 parent 0d5bd75 commit 25ad241

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed
 

‎dist/js/ionic-angular.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24889,6 +24889,8 @@ angular.module('ionic.ui.list', ['ngAnimate'])
2488924889
}
2489024890
});
2489124891

24892+
$scope.listView = lv;
24893+
2489224894
if($attr.refreshComplete) {
2489324895
$scope.refreshComplete = function() {
2489424896
lv.doneRefreshing();

‎js/ext/angular/src/directive/ionicList.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ angular.module('ionic.ui.list', ['ngAnimate'])
201201
}
202202
});
203203

204+
$scope.listView = lv;
205+
204206
if($attr.refreshComplete) {
205207
$scope.refreshComplete = function() {
206208
lv.doneRefreshing();
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
describe('Ionic List', function() {
2-
var modal, q;
2+
var compile, scope;
33

44
beforeEach(module('ionic.ui.list'));
55

6-
beforeEach(function() {
7-
});
6+
beforeEach(inject(function($compile, $rootScope, $controller) {
7+
compile = $compile;
8+
scope = $rootScope;
9+
}));
810

911
it('Should init', function() {
12+
element = compile('<list>' +
13+
'<list-item></list-item>' +
14+
'<list-item></list-item>' +
15+
'</list>')(scope);
16+
17+
expect(element.children().length).toBe(2);
1018
});
1119
});

0 commit comments

Comments
 (0)
Please sign in to comment.