0
有下面的代码:
$scope.removePoint = function(point) {
$modal.open({
templateUrl: 'templates/deleting_modal.html',
controller: 'DeletingPointModalController',
size: 'sm',
resolve: {
points: function() {
return $scope.points;
},
point: function() {
return point;
}
}
});
};
我想测试一下:
describe('HomeController', function() {
beforeEach(module('app'));
var $scope;
beforeEach(inject(function(_$controller_, _$rootScope_){
$scope = _$rootScope_.$new();
_$controller_('HomeController', { $scope: $scope });
}));
});
但我不明白,如果模态窗口已经打开我如何测试。预先感谢!