describe('PersonProfileController', function () { 'use strict'; beforeEach(module('myitsmApp')); beforeEach(inject(function ($injector, $rootScope, $controller, $stateParams) { this.scope = $rootScope.$new(); this.$stateParams = $stateParams; this.controller = $controller; this.controllerInstance = this.controller('PersonProfileController', { $scope: this.scope, $stateParams: { id: 12233 } }); })); it('should defined', function () { expect(this.controllerInstance).toBeDefined(); }); it('should defined person id', function () { expect(this.scope.personId).toEqual(12233); }); });