Skip to content

Commit

Permalink
Added a caret to mask factory to fix issues with the cursor positioni…
Browse files Browse the repository at this point in the history
…ng in android with chrome. Fix assisrafael#305. Fixing money-test it syntax.
  • Loading branch information
Buzunda committed Feb 14, 2018
1 parent 94fd51c commit e792a01
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions src/global/money/money.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,23 +154,8 @@ describe('ui-money-mask', function() {
}
});

it('should handle corner cases', angular.mock.inject(function($rootScope) {
var input = TestUtil.compile('<input ng-model="model" ui-money-mask>');
var model = input.controller('ngModel');

var tests = [
{modelValue: '0', viewValue: '$ 0.00'},
{modelValue: '0.0', viewValue: '$ 0.00'},
{modelValue: 0, viewValue: '$ 0.00'},
{},
{modelValue: null, viewValue: null},
];

tests.forEach(function(test) {
$rootScope.model = test.modelValue;
$rootScope.$digest();
expect(model.$viewValue).toBe(test.viewValue);
});
describe('should handle corner cases', angular.mock.inject(function($rootScope) {


it('should return null if $isEmpty value', function() {
var input = TestUtil.compile('<input ng-model="model" ui-money-mask>', {});
Expand Down

0 comments on commit e792a01

Please sign in to comment.