From 0da4902e9db4f6f494b8be74c41f21d5e5520b79 Mon Sep 17 00:00:00 2001 From: Di Peng Date: Wed, 24 Aug 2011 11:00:18 -0700 Subject: feat(locale): add getPluralCat function --- test/service/localeSpec.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/service') diff --git a/test/service/localeSpec.js b/test/service/localeSpec.js index 048cf5b5..4be49275 100644 --- a/test/service/localeSpec.js +++ b/test/service/localeSpec.js @@ -36,5 +36,13 @@ describe('$locale', function() { expect(datetime.MONTH.length).toBe(12); expect(datetime.AMPMS.length).toBe(2); }); + + + it('should return correct plural types', function() { + expect($locale.pluralCat(-1)).toBe('other'); + expect($locale.pluralCat(0)).toBe('other'); + expect($locale.pluralCat(2)).toBe('other'); + expect($locale.pluralCat(1)).toBe('one'); + }) }); -- cgit v1.2.3