Skip to content

Commit

Permalink
More list view tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Lynch committed Nov 22, 2013
1 parent 0d5bd75 commit 25ad241
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions dist/js/ionic-angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -24889,6 +24889,8 @@ angular.module('ionic.ui.list', ['ngAnimate'])
}
});

$scope.listView = lv;

if($attr.refreshComplete) {
$scope.refreshComplete = function() {
lv.doneRefreshing();
Expand Down
2 changes: 2 additions & 0 deletions js/ext/angular/src/directive/ionicList.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ angular.module('ionic.ui.list', ['ngAnimate'])
}
});

$scope.listView = lv;

if($attr.refreshComplete) {
$scope.refreshComplete = function() {
lv.doneRefreshing();
Expand Down
14 changes: 11 additions & 3 deletions js/ext/angular/test/directive/ionicList.unit.js
Original file line number Diff line number Diff line change
@@ -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);
});
});

0 comments on commit 25ad241

Please sign in to comment.