Skip to content

Commit

Permalink
fix untittests.
Browse files Browse the repository at this point in the history
  • Loading branch information
uenala committed Dec 19, 2015
1 parent 92abe80 commit 12bde91
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion SpaBergaufDotCh/app/home/controllers/home-controller_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@

describe('HomeCtrl', function () {
var ctrl;
var scope;

beforeEach(angular.mock.module('home'));

beforeEach(inject(function ($rootScope, $controller) {
ctrl = $controller('HomeCtrl');
scope = $rootScope.$new();
ctrl = $controller('HomeCtrl' , {$scope: scope});
}));

it('should have ctrlName as HomeCtrl', function () {
Expand Down
10 changes: 6 additions & 4 deletions SpaBergaufDotCh/app/home/controllers/userhome-controller_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@

describe('UserhomeCtrl', function () {
var ctrl;
var scope;

beforeEach(angular.mock.module('home'));

beforeEach(inject(function ($rootScope, $controller) {
ctrl = $controller('UserhomeCtrl');
scope = $rootScope.$new();
ctrl = $controller('UserhomeCtrl', {$scope: scope});
}));

// it('should have ctrlName as UserhomeCtrl', function () {
// expect(ctrl.ctrlName).toEqual('UserhomeCtrl');
// });
it('should have ctrlName as UserhomeCtrl', function () {
expect(ctrl.ctrlName).toEqual('UserhomeCtrl');
});

});

0 comments on commit 12bde91

Please sign in to comment.