Skip to content

Instantly share code, notes, and snippets.

@yngvebn
Created October 19, 2015 19:37
Show Gist options
  • Save yngvebn/bb5a0ff2edd16f2f5e2f to your computer and use it in GitHub Desktop.
Save yngvebn/bb5a0ff2edd16f2f5e2f to your computer and use it in GitHub Desktop.
describe('$scope.grade', function() {
it('sets the strength to "strong" if the password length is >8 chars', function() {
var $scope = {};
var controller = $controller('PasswordController', { $scope: $scope });
$scope.password = 'longerthaneightchars';
$scope.grade();
expect($scope.strength).toEqual('strong');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment