fix($locale): Allow currency filter to fall back to maxFrac from locale

- Modify default fallback to `NUMBER_FORMATS.PATTERNS[1].maxFrac`

- Remove unnecessary resetting

Closes #10179
This commit is contained in:
Wesley Cho
2014-11-22 10:50:54 -08:00
committed by Igor Minar
parent 764fa869dd
commit 6dbd606ad7
2 changed files with 8 additions and 3 deletions

View File

@@ -120,6 +120,12 @@ describe('filters', function() {
expect(currency(0.008)).toBe('$0.01');
expect(currency(0.003)).toBe('$0.00');
});
it('should set the default fraction size to the max fraction size of the locale value', inject(function($locale) {
$locale.NUMBER_FORMATS.PATTERNS[1].maxFrac = 1;
expect(currency(1.07)).toBe('$1.1');
}));
});