angular.module('myApp.mainview', [])
.config([ '$urlRouterProvider', '$stateProvider', MainGridConfig ])
.controller('homeCtrl',[ '$scope', '$location', '$timeout','quotesservice','base64service', MainPageGrid ]);
function MainGridConfig($urlRouterProvider, $stateProvider) {
'use strict';
$urlRouterProvider.otherwise('/');
$stateProvider.state('home', {
url : '/',
templateUrl : 'template/home.html',
controller : 'homeCtrl'
});
}
function MainPageGrid($scope, $location, $timeout,quotesservice,base64service) {
.....
}
describe('Controller:homeCtrl',function(){
var $controller, scope;
var urlRouterProviderMock = {
};
beforeEach(function(){
module('myApp.mainview');
});
beforeEach(function () {
module(function ($provide) {
$provide.value('$urlRouterProvider', urlRouterProviderMock);
});
});
beforeEach(inject(function(_$controller_){
$controller = _$controller_;
}));
describe('test function',function(){
it('should be true', inject(function($rootScope){
scope = $rootScope.$new();
var ctrl = $controller('mainCtrl', { $scope: scope, $urlRouterProvider: urlRouterProviderMock });
}));
});
});