aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/guide/dev_guide.services.testing_services.ngdoc
diff options
context:
space:
mode:
authorIgor Minar2011-06-15 22:31:40 -0700
committerIgor Minar2011-06-15 22:31:40 -0700
commitb842642b574a2b95c53b791308ed1bf8ff9d304d (patch)
treefb26431c5372be74de2105df77e94dea4f198489 /docs/content/guide/dev_guide.services.testing_services.ngdoc
parentd428c9910e66246c2af46602499acaeaf187d75b (diff)
downloadangular.js-b842642b574a2b95c53b791308ed1bf8ff9d304d.tar.bz2
docs - stripping extra new lines
Diffstat (limited to 'docs/content/guide/dev_guide.services.testing_services.ngdoc')
-rw-r--r--docs/content/guide/dev_guide.services.testing_services.ngdoc14
1 files changed, 0 insertions, 14 deletions
diff --git a/docs/content/guide/dev_guide.services.testing_services.ngdoc b/docs/content/guide/dev_guide.services.testing_services.ngdoc
index 65e1ab6d..bc860364 100644
--- a/docs/content/guide/dev_guide.services.testing_services.ngdoc
+++ b/docs/content/guide/dev_guide.services.testing_services.ngdoc
@@ -3,29 +3,24 @@
@name Developer Guide: Angular Services: Testing Angular Services
@description
-
Following is a unit test for the service in the example in {@link
dev_guide.services.registering_services Registering Angular Services}. The unit test example uses
Jasmine spy (mock) instead of a real browser alert.
-
<pre>
var mock, notify;
-
beforeEach(function() {
mock = {alert: jasmine.createSpy()};
notify = angular.service('notify')(mock);
});
-
it('should not alert first two notifications', function() {
notify('one');
notify('two');
expect(mock.alert).not.toHaveBeenCalled();
});
-
it('should alert all after third notification', function() {
notify('one');
notify('two');
@@ -33,7 +28,6 @@ notify('three');
expect(mock.alert).toHaveBeenCalledWith("one\ntwo\nthree");
});
-
it('should clear messages after alert', function() {
notify('one');
notify('two');
@@ -47,24 +41,16 @@ expect(mock.alert.mostRecentCall.args).toEqual(["more\ntwo\nthird"]);
</pre>
-
-
## Related Topics
-
* {@link dev_guide.services.understanding_services Understanding Angular Services}
* {@link dev_guide.services.creating_services Creating Angular Services}
* {@link dev_guide.services.registering_services Registering Angular Services}
* {@link dev_guide.services.managing_dependencies Managing Service Dependencies}
* {@link dev_guide.services.injecting_controllers Injecting Services Into Conrollers}
-
## Related API
-
* {@link api/angular.service Angular Service API}
-
-
-