From da464683aa7a76bd58deb889398e148e25cd2f7f Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Sat, 16 Jul 2011 22:01:19 -0700 Subject: doc(ng:include): improve the doc example to avoid confusion --- docs/examples/ng-include/template1.html | 1 + docs/examples/ng-include/template2.html | 1 + src/widgets.js | 18 ++++++++++-------- 3 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 docs/examples/ng-include/template1.html create mode 100644 docs/examples/ng-include/template2.html diff --git a/docs/examples/ng-include/template1.html b/docs/examples/ng-include/template1.html new file mode 100644 index 00000000..804b7e0d --- /dev/null +++ b/docs/examples/ng-include/template1.html @@ -0,0 +1 @@ +Content of template1.html diff --git a/docs/examples/ng-include/template2.html b/docs/examples/ng-include/template2.html new file mode 100644 index 00000000..dad193c7 --- /dev/null +++ b/docs/examples/ng-include/template2.html @@ -0,0 +1 @@ +Content of template2.html diff --git a/src/widgets.js b/src/widgets.js index 3a7fa2a3..db39e783 100644 --- a/src/widgets.js +++ b/src/widgets.js @@ -824,21 +824,23 @@ angularWidget('select', function(element){ - url = {{url}} + url of the template: {{url}}
- it('should load date filter', function(){ - expect(element('.doc-example-live ng\\:include').text()).toMatch(/angular\.filter\.date/); + it('should load template1.html', function(){ + expect(element('.doc-example-live ng\\:include').text()). + toBe('Content of template1.html\n'); }); - it('should change to html filter', function(){ - select('url').option('api/angular.filter.html.html'); - expect(element('.doc-example-live ng\\:include').text()).toMatch(/angular\.filter\.html/); + it('should load template2.html', function(){ + select('url').option('examples/ng-include/template2.html'); + expect(element('.doc-example-live ng\\:include').text()). + toBe('Content of template2.html\n'); }); it('should change to blank', function(){ select('url').option(''); -- cgit v1.2.3