Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
manuquentin committed May 18, 2015
1 parent 41d029b commit 25e7114
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/javascripts/ng-admin/Crud/list/DatagridController.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ define(function () {
this.$location = $location;
this.$anchorScroll = $anchorScroll;
this.filters = {};
this.shouldDisplayActions = this.$scope.listActions().length > 0;
this.shouldDisplayActions = this.$scope.listActions() && this.$scope.listActions().length > 0;

$scope.toggleSelect = this.toggleSelect.bind(this);
$scope.toggleSelectAll = this.toggleSelectAll.bind(this);
Expand Down
12 changes: 12 additions & 0 deletions src/javascripts/ng-admin/Crud/misc/PromisesResolver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*global define*/
define(function () {
'use strict';

function PromisesResolver(AdminDescription) {
return AdminDescription.getPromisesResolver();
}

PromisesResolver.$inject = ['AdminDescription'];

return PromisesResolver;
});
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ define(function (require) {
entries = [
new Entry('my_entity', {value: 1}, 1),
new Entry('my_entity', {value: 2}, 2),
new Entry('my_entity', {value: 3}, 3),
new Entry('my_entity', {value: 3}, 3)
];

dataGridController = new DataGridController({
listActions: function() {},
entity: function () {
return new Entity('my_entity');
},
Expand Down

0 comments on commit 25e7114

Please sign in to comment.