aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/rootElementSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ng/rootElementSpec.js')
-rw-r--r--test/ng/rootElementSpec.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ng/rootElementSpec.js b/test/ng/rootElementSpec.js
new file mode 100644
index 00000000..81272093
--- /dev/null
+++ b/test/ng/rootElementSpec.js
@@ -0,0 +1,12 @@
+'use strict';
+
+describe('$rootElement', function() {
+ it('should publish the bootstrap element into $rootElement', function() {
+ var element = jqLite('<div></div>');
+ var injector = angular.bootstrap(element);
+
+ expect(injector.get('$rootElement')[0]).toBe(element[0]);
+
+ dealoc(element);
+ });
+});