From 0b114fd3e1ce4cc120663222f2dfb34ee5dbda4c Mon Sep 17 00:00:00 2001 From: Jeff Cross Date: Fri, 2 Aug 2013 09:21:33 -0700 Subject: fix(docs-bootstrap): Removed injector from bootstrapped docs samples This is necessary to make e2e tests pass for implementing #3411. At present, the docs are violating the rule being enforced by double-bootstrap prevention. --- test/jqLiteSpec.js | 14 ++++++++++++++ test/testabilityPatch.js | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/jqLiteSpec.js b/test/jqLiteSpec.js index abfad064..913e6192 100644 --- a/test/jqLiteSpec.js +++ b/test/jqLiteSpec.js @@ -126,6 +126,20 @@ describe('jqLite', function() { dealoc(doc); } ); + + it('should return null values', function () { + var ul = jqLite(''), + li = ul.find('li'), + b = li.find('b'); + + ul.data('foo', 'bar'); + li.data('foo', null); + expect(b.inheritedData('foo')).toBe(null); + expect(li.inheritedData('foo')).toBe(null); + expect(ul.inheritedData('foo')).toBe('bar'); + + dealoc(ul); + }); }); diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js index 7b4fe0ec..514a5fdb 100644 --- a/test/testabilityPatch.js +++ b/test/testabilityPatch.js @@ -56,7 +56,7 @@ afterEach(function() { forEachSorted(cache, function(expando, key){ angular.forEach(expando.data, function(value, key){ count ++; - if (value.$element) { + if (value && value.$element) { dump('LEAK', key, value.$id, sortedHtml(value.$element)); } else { dump('LEAK', key, angular.toJson(value)); -- cgit v1.2.3