From 88fbf9e51fadd0b46ac418c2c1dd0507546d2196 Mon Sep 17 00:00:00 2001 From: David Baldwynn Date: Sun, 29 Oct 2017 12:20:49 -0700 Subject: [PATCH] got user tests to pass --- .../users/controllers/authentication.client.controller.js | 2 +- .../unit/controllers/authentication.client.controller.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/modules/users/controllers/authentication.client.controller.js b/public/modules/users/controllers/authentication.client.controller.js index b2bb6c89..dc59f9f1 100755 --- a/public/modules/users/controllers/authentication.client.controller.js +++ b/public/modules/users/controllers/authentication.client.controller.js @@ -9,7 +9,7 @@ angular.module('users').controller('AuthenticationController', ['$scope', '$loca $scope.forms = {}; $scope.signin = function() { - if(!$scope.forms.signinForm.$invalid){ + if($scope.forms && $scope.forms.hasOwnProperty('siginForm') && !$scope.forms.signinForm.$invalid){ User.login($scope.credentials).then( function(response) { Auth.login(response); diff --git a/public/modules/users/tests/unit/controllers/authentication.client.controller.test.js b/public/modules/users/tests/unit/controllers/authentication.client.controller.test.js index 363f1f37..604f90e6 100644 --- a/public/modules/users/tests/unit/controllers/authentication.client.controller.test.js +++ b/public/modules/users/tests/unit/controllers/authentication.client.controller.test.js @@ -80,7 +80,7 @@ // Load the main application module beforeEach(module(ApplicationConfiguration.applicationModuleName)); - + beforeEach(module('module-templates')); beforeEach(module('stateMock')); // Mock Users Service