From: Dobrica Pavlinusic Date: Thu, 24 Jan 2013 13:30:20 +0000 (+0100) Subject: added RegistrationStatus array X-Git-Tag: 0.7~26 X-Git-Url: http://git.rot13.org/?p=angular-drzb;a=commitdiff_plain;h=c9a3f5b1cdad9fcb9a06a83ffcc29faa94f3b704 added RegistrationStatus array --- diff --git a/app/js/controllers.js b/app/js/controllers.js index 8449eee..0576a11 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -2,7 +2,7 @@ /* Controllers */ -function RegistrationCtrl($scope, $log, Registration, $routeParams, $location, $route, Organizations) { +function RegistrationCtrl($scope, $log, Registration, $routeParams, $location, $route, Organizations, RegistrationStatus) { $scope.$routeParams = $routeParams; $scope.$location = $location; @@ -11,6 +11,7 @@ function RegistrationCtrl($scope, $log, Registration, $routeParams, $location, $ $scope.organizations = data; $log.info('organizations promise ', $scope.organizations); }); + $scope.RegistrationStatus = RegistrationStatus; $scope.update = function(registration, state) { diff --git a/app/js/services.js.ep b/app/js/services.js.ep index 2545b4d..955a7e0 100644 --- a/app/js/services.js.ep +++ b/app/js/services.js.ep @@ -65,4 +65,8 @@ angular.module('myApp.services', [ 'ngResource' ]). }; return $scope.organizations; + }). +/* http://jsfiddle.net/asgoth/7bNAd/ */ + value('RegistrationStatus', function() { + return [ 'draft', 'confirmation', 'verified' ]; }); diff --git a/test/unit/servicesSpec.js b/test/unit/servicesSpec.js index 7c5033e..da1effd 100644 --- a/test/unit/servicesSpec.js +++ b/test/unit/servicesSpec.js @@ -18,4 +18,11 @@ describe('service', function() { expect(RegistrationTypes[0].css_class).toBeDefined(); })); }); + + describe('RegistrationStatus', function() { + it('have status', inject(function(RegistrationStatus) { + expect(RegistrationStatus().length).toBe(3); + })); + }); + });