diff options
| author | Igor Minar | 2013-02-25 20:43:27 -0800 |
|---|---|---|
| committer | Igor Minar | 2013-02-25 21:38:29 -0800 |
| commit | 7ddbde8c1c00e08a63de9701e29bf5e8bed051b8 (patch) | |
| tree | dc8344c77b3b58a2fef8422bd86804bcfe4525c0 /test/ng/compileSpec.js | |
| parent | 753fc9e58d5e554d4930548558efecc283557eeb (diff) | |
| download | angular.js-7ddbde8c1c00e08a63de9701e29bf5e8bed051b8.tar.bz2 | |
chore(sortedHtml): print attributes with empty value
I had to also fix some tests as they started failing on IE8.
We should figure out why these extra attributes are set in IE8,
but I'm too tired of IE to worry about it now. Since I'm
not introducing this issue just making it visible, I'm going
to commit this as is.
Diffstat (limited to 'test/ng/compileSpec.js')
| -rw-r--r-- | test/ng/compileSpec.js | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index ae1eb000..a03ad929 100644 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -741,12 +741,16 @@ describe('$compile', function() { $rootScope.$digest(); - expect(sortedHtml(element)). - toEqual('<div><b class="i-hello"></b><span class="i-cau">Cau!</span></div>'); + expect(sortedHtml(element)).toBeOneOf( + '<div><b class="i-hello"></b><span class="i-cau">Cau!</span></div>', + '<div><b class="i-hello"></b><span class="i-cau" i-cau="">Cau!</span></div>' //ie8 + ); $httpBackend.flush(); - expect(sortedHtml(element)). - toEqual('<div><span class="i-hello">Hello!</span><span class="i-cau">Cau!</span></div>'); + expect(sortedHtml(element)).toBeOneOf( + '<div><span class="i-hello">Hello!</span><span class="i-cau">Cau!</span></div>', + '<div><span class="i-hello" i-hello="">Hello!</span><span class="i-cau" i-cau="">Cau!</span></div>' //ie8 + ); } )); @@ -773,8 +777,10 @@ describe('$compile', function() { $rootScope.$digest(); - expect(sortedHtml(element)). - toEqual('<div><span class="i-hello">Hello, Elvis!</span></div>'); + expect(sortedHtml(element)).toBeOneOf( + '<div><span class="i-hello">Hello, Elvis!</span></div>', + '<div><span class="i-hello" i-hello="">Hello, Elvis!</span></div>' //ie8 + ); } )); @@ -803,8 +809,10 @@ describe('$compile', function() { element = template($rootScope); $rootScope.$digest(); - expect(sortedHtml(element)). - toEqual('<div><span class="i-hello">Hello, Elvis!</span></div>'); + expect(sortedHtml(element)).toBeOneOf( + '<div><span class="i-hello">Hello, Elvis!</span></div>', + '<div><span class="i-hello" i-hello="">Hello, Elvis!</span></div>' //ie8 + ); } )); @@ -1491,13 +1499,13 @@ describe('$compile', function() { $rootScope.$digest(); expect(sortedHtml(element).replace(' selected="true"', '')). toEqual('<select ng:model="x">' + - '<option>Greet !</option>' + + '<option value="">Greet !</option>' + '</select>'); $rootScope.name = 'Misko'; $rootScope.$digest(); expect(sortedHtml(element).replace(' selected="true"', '')). toEqual('<select ng:model="x">' + - '<option>Greet Misko!</option>' + + '<option value="">Greet Misko!</option>' + '</select>'); })); |
