aboutsummaryrefslogtreecommitdiffstats
path: root/docs/spec/ngdocSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2011-01-31 11:55:44 -0800
committerMisko Hevery2011-02-01 09:58:37 -0800
commited768ebc53ef6746ca83d81892c22d2e9c3afeef (patch)
tree2835e5ab21d4700724c28d8bf1178ea13e622eae /docs/spec/ngdocSpec.js
parent9fd3dfe49d283c136e29bf60c0da6d4fe2aaed3d (diff)
downloadangular.js-ed768ebc53ef6746ca83d81892c22d2e9c3afeef.tar.bz2
Developer guide documentation
Diffstat (limited to 'docs/spec/ngdocSpec.js')
-rw-r--r--docs/spec/ngdocSpec.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/docs/spec/ngdocSpec.js b/docs/spec/ngdocSpec.js
index 9d84ee7e..d912bf3a 100644
--- a/docs/spec/ngdocSpec.js
+++ b/docs/spec/ngdocSpec.js
@@ -319,6 +319,7 @@ describe('ngdoc', function(){
var doc = new Doc("@description " +
'foo {@link angular.foo}\n\n da {@link angular.foo bar foo bar } \n\n' +
'dad{@link angular.foo}\n\n' +
+ 'external{@link http://angularjs.org}\n\n' +
'{@link angular.directive.ng:foo ng:foo}');
doc.parse();
expect(doc.description).
@@ -329,6 +330,8 @@ describe('ngdoc', function(){
toContain('dad<a href="#!angular.foo"><code>angular.foo</code></a>');
expect(doc.description).
toContain('<a href="#!angular.directive.ng:foo"><code>ng:foo</code></a>');
+ expect(doc.description).
+ toContain('<a href="http://angularjs.org">http://angularjs.org</a>');
});
});
@@ -357,12 +360,16 @@ describe('ngdoc', function(){
});
it('should render description in related method', function(){
- var doc = new Doc();
+ var doc = new Doc('').parse();
doc.ngdoc = 'service';
- doc.methods = [new Doc('@ngdoc method\n@exampleDescription MDesc\n@example MExmp').parse()];
- doc.properties = [new Doc('@ngdoc property\n@exampleDescription PDesc\n@example PExmp').parse()];
- expect(doc.html()).toContain('<p>MDesc</p><div ng:non-bindable=""><pre class="brush: js; html-script: true;">MExmp</pre>');
- expect(doc.html()).toContain('<p>PDesc</p><div ng:non-bindable=""><pre class="brush: js; html-script: true;">PExmp</pre>');
+ doc.methods = [
+ new Doc('@ngdoc method\n@exampleDescription MDesc\n@example MExmp').parse()];
+ doc.properties = [
+ new Doc('@ngdoc property\n@exampleDescription PDesc\n@example PExmp').parse()];
+ expect(doc.html()).toContain('<p>MDesc</p><div ng:non-bindable="">' +
+ '<pre class="brush: js; html-script: true;">MExmp</pre>');
+ expect(doc.html()).toContain('<p>PDesc</p><div ng:non-bindable="">' +
+ '<pre class="brush: js; html-script: true;">PExmp</pre>');
});
});