correct name is RegistrationState
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 24 Jan 2013 13:52:50 +0000 (14:52 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 24 Jan 2013 13:52:50 +0000 (14:52 +0100)
app/js/controllers.js
app/js/services.js.ep
test/unit/servicesSpec.js

index 0576a11..7706503 100644 (file)
@@ -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) {
 
index 955a7e0..9c0f251 100644 (file)
@@ -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' ];
        });
index da1effd..83cdd83 100644 (file)
@@ -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);
                }));
        });