diff options
| author | Igor Minar | 2011-01-20 12:55:03 -0800 | 
|---|---|---|
| committer | Igor Minar | 2011-01-20 12:55:03 -0800 | 
| commit | 4a569560d8b667e625f8d9c9aea2e02945af058c (patch) | |
| tree | 442528a6081c3ac5a6e54b94409cd49cc581ae8a /test/directivesSpec.js | |
| parent | 17ee0f031ac4a37bf9a1dc8c87ffac4bd164d1cc (diff) | |
| download | angular.js-4a569560d8b667e625f8d9c9aea2e02945af058c.tar.bz2 | |
null and other falsy values should not be rendered in the view
Closes #242
Diffstat (limited to 'test/directivesSpec.js')
| -rw-r--r-- | test/directivesSpec.js | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/test/directivesSpec.js b/test/directivesSpec.js index ef8241f1..caf0bc15 100644 --- a/test/directivesSpec.js +++ b/test/directivesSpec.js @@ -80,6 +80,12 @@ describe("directive", function(){        expect(sortedHtml(scope.$element)).toEqual('<div>before<div class="filter" ng:bind="0|myFilter">HELLO</div>after</div>');      }); + +    it('should suppress rendering of falsy values', function(){ +      var scope = compile('<div>{{ null }}{{ undefined }}{{ "" }}-{{ 0 }}{{ false }}</div>'); +      expect(scope.$element.text()).toEqual('-0false'); +    }); +    });    describe('ng:bind-template', function(){ | 
