diff options
Diffstat (limited to 'test/directivesSpec.js')
| -rw-r--r-- | test/directivesSpec.js | 24 | 
1 files changed, 24 insertions, 0 deletions
diff --git a/test/directivesSpec.js b/test/directivesSpec.js index 88e70b50..c0533745 100644 --- a/test/directivesSpec.js +++ b/test/directivesSpec.js @@ -557,4 +557,28 @@ describe("directive", function() {        expect(element.hasClass('bar')).toBe(true);      }));    }); + + +  describe('style', function() { + +    it('should not compile style element', inject(function($compile, $rootScope) { +      element = jqLite('<style type="text/css">should {{notBound}}</style>'); +      $compile(element)($rootScope); +      $rootScope.$digest(); + +      // read innerHTML and trim to pass on IE8 +      expect(trim(element[0].innerHTML)).toBe('should {{notBound}}'); +    })); + + +    it('should compile content of element with style attr', inject(function($compile, $rootScope) { +      element = jqLite('<div style="some">{{bind}}</div>'); +      $compile(element)($rootScope); +      $rootScope.$apply(function() { +        $rootScope.bind = 'value'; +      }); + +      expect(element.text()).toBe('value'); +    })); +  });  });  | 
