aboutsummaryrefslogtreecommitdiffstats
path: root/test/directive/scriptSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2012-03-23 14:03:24 -0700
committerMisko Hevery2012-03-28 11:16:35 -0700
commit2430f52bb97fa9d682e5f028c977c5bf94c5ec38 (patch)
treee7529b741d70199f36d52090b430510bad07f233 /test/directive/scriptSpec.js
parent944098a4e0f753f06b40c73ca3e79991cec6c2e2 (diff)
downloadangular.js-2430f52bb97fa9d682e5f028c977c5bf94c5ec38.tar.bz2
chore(module): move files around in preparation for more modules
Diffstat (limited to 'test/directive/scriptSpec.js')
-rw-r--r--test/directive/scriptSpec.js44
1 files changed, 0 insertions, 44 deletions
diff --git a/test/directive/scriptSpec.js b/test/directive/scriptSpec.js
deleted file mode 100644
index 471e04ce..00000000
--- a/test/directive/scriptSpec.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict';
-
-describe('scriptDirective', function() {
- var element;
-
-
- afterEach(function(){
- dealoc(element);
- });
-
-
- it('should populate $templateCache with contents of a ng-template script element', inject(
- function($compile, $templateCache) {
- if (msie <=8) return;
- // in ie8 it is not possible to create a script tag with the right content.
- // it always comes up as empty. I was trying to set the text of the
- // script tag, but that did not work either, so I gave up.
- $compile('<div>foo' +
- '<script id="/ignore">ignore me</script>' +
- '<script type="text/ng-template" id="/myTemplate.html"><x>{{y}}</x></script>' +
- '</div>' );
- expect($templateCache.get('/myTemplate.html')).toBe('<x>{{y}}</x>');
- expect($templateCache.get('/ignore')).toBeUndefined();
- }
- ));
-
-
- it('should not compile scripts', inject(function($compile, $templateCache, $rootScope) {
- if (msie <=8) return; // see above
-
- var doc = jqLite('<div></div>');
- // jQuery is too smart and removes
- doc[0].innerHTML = '<script type="text/javascript">some {{binding}}</script>' +
- '<script type="text/ng-template" id="/some">other {{binding}}</script>';
-
- $compile(doc)($rootScope);
- $rootScope.$digest();
-
- var scripts = doc.find('script');
- expect(scripts.eq(0).text()).toBe('some {{binding}}');
- expect(scripts.eq(1).text()).toBe('other {{binding}}');
- dealoc(doc);
- }));
-});