Skip to content

Commit bbf39ef

Browse files
committed
test(*): Remove redundant mockBackend code within controller
1 parent 72eaae4 commit bbf39ef

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

test/spec/controllers/fib.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
describe('Controller: FibCtrl', function () {
44

55
// load the controller's module
6-
beforeEach(module('eShellApp'), ['eywa']);
7-
// beforeEach(angular.module('eywa'));
6+
beforeEach(module('eShellApp'));
87

9-
var FibCtrl, scope, eywa, checker, $httpBackend;
8+
var FibCtrl, scope, checker, $httpBackend;
109

1110
// Initialize the controller and a mock scope
1211
beforeEach(inject(function ($controller, $rootScope, _$httpBackend_, _checker_) {
@@ -18,7 +17,6 @@ describe('Controller: FibCtrl', function () {
1817
FibCtrl = $controller('FibCtrl', {
1918
$scope: scope
2019
});
21-
$httpBackend.flush();
2220

2321
scope.data = {
2422
text : 'AngularJS is originally created in [[1]] by [[2]]',
@@ -32,11 +30,6 @@ describe('Controller: FibCtrl', function () {
3230
};
3331
}));
3432

35-
afterEach(function() {
36-
$httpBackend.verifyNoOutstandingExpectation();
37-
$httpBackend.verifyNoOutstandingRequest();
38-
});
39-
4033
it('should set class', function() {
4134
expect(scope.setClass(true)).toBe('success');
4235
expect(scope.setClass(false)).toBe('error');

0 commit comments

Comments
 (0)