Skip to content

Instantly share code, notes, and snippets.

View aj-dev's full-sized avatar

Audrius Jakumavičius aj-dev

View GitHub Profile
@aj-dev
aj-dev / profile.service.spec.js
Last active October 5, 2017 21:21
profileService unit tests
describe('profileService', function () {
'use strict';
var $q, $httpBackend, profileService;
var sessionServiceMock = jasmine.createSpyObj('sessionService', [
'authenticate',
'getUserProfile'
]);
@aj-dev
aj-dev / profile.service.js
Created October 5, 2017 19:44
profileService
(function () {
'use strict';
angular.module('evbox.profile')
.factory('profileService', profileService);
profileService.$inject = ['$http', 'sessionService'];
function profileService($http, sessionService) {
return {
@aj-dev
aj-dev / cards.controller.spec.js
Last active December 12, 2016 14:14
`CardsController` unit tests
describe('CardsController', function () {
'use strict';
var $controller, controller, cardsMock;
var cardServiceMock = jasmine.createSpyObj('cardService', [
'getColumns',
'updateColumnState',
'getOrderTitles',
'orderBy',
@aj-dev
aj-dev / cards.controller.js
Created December 8, 2016 19:00
CardsController
(function () {
'use strict';
angular.module('evbox.cards')
.controller('CardsController', CardsController);
CardsController.$inject = ['cardService', 'permissionService', 'utils'];
function CardsController(cardService, permissionService, utils) {
var $ctrl = this;
@aj-dev
aj-dev / login.route.spec.js
Last active April 19, 2017 19:07
`anon.login.route` state unit tests
describe('login route', function () {
'use strict';
var $httpBackend, $q, $state, $templateCache, $location;
var languageServiceMock = jasmine.createSpyObj('languageService', [
'getTenantLanguages'
]);
var sessionServiceMock = jasmine.createSpyObj('sessionService', [
@aj-dev
aj-dev / landing.route.js
Last active October 12, 2016 14:57
`anon.landing` state configuration
(function () {
'use strict';
angular.module('evbox.landing')
.config(stateConfig);
stateConfig.$inject = ['$stateProvider'];
function stateConfig($stateProvider) {
$stateProvider.state('anon.landing', {
@aj-dev
aj-dev / login.route.js
Last active October 12, 2016 14:57
`anon.landing.login` state configuration
(function () {
'use strict';
angular.module('evbox.landing.login')
.config(stateConfig);
stateConfig.$inject = ['$stateProvider'];
function stateConfig($stateProvider) {
$stateProvider.state('anon.landing.login', {