+ beforeEach(module('myApp'));
+
+ var scope, ctrl, $httpBackend;
+
+ beforeEach(inject(function($injector) {
+ $httpBackend = $injector.get('$httpBackend');
+
+ $httpBackend
+ .when('JSONP', '/<%= $couchdb_database %>/_design/registration/_view/organizations?group=true;format=key_array;callback=JSON_CALLBACK')
+ .respond({ rows: [ 'foo', 'bar', 'baz' ] })
+ ;
+
+ $httpBackend.when('GET', 'partials/registration.html').respond('')
+
+ }));
+
+ afterEach(function() {
+ $httpBackend.verifyNoOutstandingExpectation();
+ $httpBackend.verifyNoOutstandingRequest();