aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng
diff options
context:
space:
mode:
Diffstat (limited to 'test/ng')
-rw-r--r--test/ng/directive/ngShowHideSpec.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ng/directive/ngShowHideSpec.js b/test/ng/directive/ngShowHideSpec.js
index 4a8e55da..30397c4c 100644
--- a/test/ng/directive/ngShowHideSpec.js
+++ b/test/ng/directive/ngShowHideSpec.js
@@ -20,6 +20,16 @@ describe('ngShow / ngHide', function() {
}));
+ // https://github.com/angular/angular.js/issues/5414
+ it('should show if the expression is a function with a no arguments', inject(function($rootScope, $compile) {
+ element = jqLite('<div ng-show="exp"></div>');
+ element = $compile(element)($rootScope);
+ $rootScope.exp = function(){};
+ $rootScope.$digest();
+ expect(element).toBeShown();
+ }));
+
+
it('should make hidden element visible', inject(function($rootScope, $compile) {
element = jqLite('<div class="ng-hide" ng-show="exp"></div>');
element = $compile(element)($rootScope);