diff options
| author | Matias Niemelä | 2013-05-20 17:02:03 -0400 |
|---|---|---|
| committer | Misko Hevery | 2013-05-20 14:39:02 -0700 |
| commit | 5a34464198f1ca108ddd085181a832d3aa181c31 (patch) | |
| tree | 6b0864c8552275cc9d5d500e1a8d318ce6939cd5 /docs/spec/domSpec.js | |
| parent | 5f92d4144ea3c8c8fc33e163b3973401b527a4bd (diff) | |
| download | angular.js-5a34464198f1ca108ddd085181a832d3aa181c31.tar.bz2 | |
fix(ngdocs): fix gen_docs.sh
Diffstat (limited to 'docs/spec/domSpec.js')
| -rw-r--r-- | docs/spec/domSpec.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/spec/domSpec.js b/docs/spec/domSpec.js index 5175b91a..7bc6a7f4 100644 --- a/docs/spec/domSpec.js +++ b/docs/spec/domSpec.js @@ -28,6 +28,24 @@ describe('dom', function() { expect(dom.toString()).toContain('<h2>sub-heading</h2>'); }); + it('should properly number nested headings', function() { + dom.h('heading', function() { + dom.h('heading2', function() { + this.html('<h1>heading3</h1>'); + }); + }); + dom.h('other1', function() { + this.html('<h1>other2</h1>'); + }); + + expect(dom.toString()).toContain('<h1 id="heading">heading</h1>'); + expect(dom.toString()).toContain('<h2 id="heading2">heading2</h2>'); + expect(dom.toString()).toContain('<h3>heading3</h3>'); + + expect(dom.toString()).toContain('<h1 id="other1">other1</h1>'); + expect(dom.toString()).toContain('<h2>other2</h2>'); + }); + }); }); |
