Skip to content

Instantly share code, notes, and snippets.

@lejoss
Last active August 29, 2015 14:25
Show Gist options
  • Save lejoss/ea836ba788a9e7329296 to your computer and use it in GitHub Desktop.
Save lejoss/ea836ba788a9e7329296 to your computer and use it in GitHub Desktop.
simple test snippet for gd-abogados
describe('Test Some Controller', function() {
var $httpBackend, $rootScope, createController, authRequestHandler;
beforeEach(angular.mock.module('seedApp'));
beforeEach(inject(function($injector) {
$httpBackend = $injector.get('$httpBackend');
$rootScope = $injector.get('$rootScope');
var $controller = $injector.get('$controller');
$httpBackend.when('GET', '/api/session').respond(200);
createController = function() {
return $controller('SomeCtrl', {$scope:$rootScope});
};
}))
afterEach(function() {
$httpBackend.verifyNoOutstandingExpectation();
$httpBackend.verifyNoOutstandingRequest();
});
it('should do something', function() {
});
it('should do something', function() {
});
it('should do something', function() {
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment