From: Dobrica Pavlinusic Date: Thu, 24 Jan 2013 13:52:50 +0000 (+0100) Subject: correct name is RegistrationState X-Git-Tag: 0.7~25 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=37729a1704049088a077f578e15b3824b9f9bf37;p=angular-drzb correct name is RegistrationState --- diff --git a/app/js/controllers.js b/app/js/controllers.js index 0576a11..7706503 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, RegistrationStatus) { +function RegistrationCtrl($scope, $log, Registration, $routeParams, $location, $route, Organizations, RegistrationState) { $scope.$routeParams = $routeParams; $scope.$location = $location; @@ -11,7 +11,7 @@ function RegistrationCtrl($scope, $log, Registration, $routeParams, $location, $ $scope.organizations = data; $log.info('organizations promise ', $scope.organizations); }); - $scope.RegistrationStatus = RegistrationStatus; + $scope.RegistrationState = RegistrationState(); $scope.update = function(registration, state) { @@ -148,7 +148,7 @@ function RegistrationCtrl($scope, $log, Registration, $routeParams, $location, $ $scope.reset(); } -RegistrationCtrl.$inject = [ '$scope', '$log', 'Registration', '$routeParams', '$location', '$route', 'Organizations' ]; +RegistrationCtrl.$inject = [ '$scope', '$log', 'Registration', '$routeParams', '$location', '$route', 'Organizations', 'RegistrationState' ]; function ListCtrl($scope, $log, Registration, RegistrationTypes, $filter) { diff --git a/app/js/services.js.ep b/app/js/services.js.ep index 955a7e0..9c0f251 100644 --- a/app/js/services.js.ep +++ b/app/js/services.js.ep @@ -67,6 +67,6 @@ angular.module('myApp.services', [ 'ngResource' ]). return $scope.organizations; }). /* http://jsfiddle.net/asgoth/7bNAd/ */ - value('RegistrationStatus', function() { + value('RegistrationState', function() { return [ 'draft', 'confirmation', 'verified' ]; }); diff --git a/test/unit/servicesSpec.js b/test/unit/servicesSpec.js index da1effd..83cdd83 100644 --- a/test/unit/servicesSpec.js +++ b/test/unit/servicesSpec.js @@ -19,9 +19,9 @@ describe('service', function() { })); }); - describe('RegistrationStatus', function() { - it('have status', inject(function(RegistrationStatus) { - expect(RegistrationStatus().length).toBe(3); + describe('RegistrationState', function() { + it('have status', inject(function(RegistrationState) { + expect(RegistrationState().length).toBe(3); })); });