Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
fixing jshint issues by requiring single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
jloveland committed Sep 11, 2015
1 parent 5c16db2 commit a38abd0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ angular.module('users')

// Strength Meter - visual indicator for users
var strengthMeter = [
{ color: "danger", progress: "20" },
{ color: "warning", progress: "40"},
{ color: "info", progress: "60"},
{ color: "primary", progress: "80"},
{ color: "success", progress: "100"}
{ color: 'danger', progress: '20' },
{ color: 'warning', progress: '40'},
{ color: 'info', progress: '60'},
{ color: 'primary', progress: '80'},
{ color: 'success', progress: '100'}
];
var strengthMax = strengthMeter.length;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict';

angular.module('users')
.directive("passwordVerify", function() {
.directive('passwordVerify', function() {
return {
require: "ngModel",
require: 'ngModel',
scope: {
passwordVerify: '='
},
Expand All @@ -19,10 +19,10 @@ angular.module('users')
modelCtrl.$parsers.unshift(function(viewValue) {
var origin = scope.passwordVerify;
if (origin !== viewValue) {
modelCtrl.$setValidity("passwordVerify", false);
modelCtrl.$setValidity('passwordVerify', false);
return undefined;
} else {
modelCtrl.$setValidity("passwordVerify", true);
modelCtrl.$setValidity('passwordVerify', true);
return viewValue;
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ angular.module('users').factory('PasswordValidator', ['$window',
return result;
},
getPopoverMsg: function () {
var popoverMsg = "Please enter a passphrase or password with greater than 10 characters, numbers, lowercase, upppercase, and special characters.";
var popoverMsg = 'Please enter a passphrase or password with greater than 10 characters, numbers, lowercase, upppercase, and special characters.';
return popoverMsg;
}
};
Expand Down
18 changes: 9 additions & 9 deletions modules/users/tests/server/user.server.model.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ describe('User Model Unit Tests:', function () {
});
});

describe("User Password Validation Tests", function() {
describe('User Password Validation Tests', function() {
it('should validate when the password strength passes - "P@$$w0rd!!"', function () {
var _user1 = new User(user1);
_user1.password = 'P@$$w0rd!!';
Expand Down Expand Up @@ -251,7 +251,7 @@ describe('User Model Unit Tests:', function () {
_user1.password = 'P@$$w0rd!';

_user1.validate(function (err) {
err.errors.password.message.should.equal("The password must be at least 10 characters long.");
err.errors.password.message.should.equal('The password must be at least 10 characters long.');
done();
});
});
Expand All @@ -261,7 +261,7 @@ describe('User Model Unit Tests:', function () {
_user1.password = ')!/uLT="lh&:`6X!]|15o!$!TJf,.13l?vG].-j],lFPe/QhwN#{Z<[*1nX@n1^?WW-%_.*D)m$toB+N7z}kcN#B_d(f41h%w@0F!]igtSQ1gl~6sEV&r~}~1ub>If1c+';

_user1.validate(function (err) {
err.errors.password.message.should.equal("The password must be fewer than 128 characters.");
err.errors.password.message.should.equal('The password must be fewer than 128 characters.');
done();
});
});
Expand All @@ -271,7 +271,7 @@ describe('User Model Unit Tests:', function () {
_user1.password = 'P@$$w0rd!!!';

_user1.validate(function (err) {
err.errors.password.message.should.equal("The password may not contain sequences of three or more repeated characters.");
err.errors.password.message.should.equal('The password may not contain sequences of three or more repeated characters.');
done();
});
});
Expand All @@ -281,7 +281,7 @@ describe('User Model Unit Tests:', function () {
_user1.password = 'p@$$w0rd!!';

_user1.validate(function (err) {
err.errors.password.message.should.equal("The password must contain at least one uppercase letter.");
err.errors.password.message.should.equal('The password must contain at least one uppercase letter.');
done();
});
});
Expand All @@ -291,7 +291,7 @@ describe('User Model Unit Tests:', function () {
_user1.password = 'P@$$word!!';

_user1.validate(function (err) {
err.errors.password.message.should.equal("The password must contain at least one number.");
err.errors.password.message.should.equal('The password must contain at least one number.');
done();
});
});
Expand All @@ -301,13 +301,13 @@ describe('User Model Unit Tests:', function () {
_user1.password = 'Passw0rdss';

_user1.validate(function (err) {
err.errors.password.message.should.equal("The password must contain at least one special character.");
err.errors.password.message.should.equal('The password must contain at least one special character.');
done();
});
});
});

describe("User E-mail Validation Tests", function() {
describe('User E-mail Validation Tests', function() {
it('should not allow invalid email address - "123"', function (done) {
var _user1 = new User(user1);

Expand Down Expand Up @@ -476,7 +476,7 @@ describe('User Model Unit Tests:', function () {
it('should allow single quote characters in email address - "abc\'def@abc.com"', function (done) {
var _user1 = new User(user1);

_user1.email = "abc\'def@abc.com";
_user1.email = 'abc\'def@abc.com';
_user1.save(function (err) {
if (!err) {
_user1.remove(function (err_remove) {
Expand Down

0 comments on commit a38abd0

Please sign in to comment.