diff options
| author | Sujeet Pillai | 2013-03-14 17:19:13 +0530 | 
|---|---|---|
| committer | Misko Hevery | 2013-03-14 22:18:20 -0700 | 
| commit | 7d4ccea579b0cf6fc39462ef6a7acab5aa675175 (patch) | |
| tree | cb23523d68171369715c3390d578d68abaab5635 /test/ng | |
| parent | 654dd1d5e8c7612f61678e968d0864a3d04082be (diff) | |
| download | angular.js-7d4ccea579b0cf6fc39462ef6a7acab5aa675175.tar.bz2 | |
fix(timezone): correct timezone date filter for 1/2 hour offsets
Diffstat (limited to 'test/ng')
| -rw-r--r-- | test/ng/filter/filtersSpec.js | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ng/filter/filtersSpec.js b/test/ng/filter/filtersSpec.js index c9ed7949..d60db9de 100644 --- a/test/ng/filter/filtersSpec.js +++ b/test/ng/filter/filtersSpec.js @@ -227,6 +227,8 @@ describe('filters', function() {        var utc       = new angular.mock.TzDate( 0, '2010-09-03T12:05:08.000Z');        var eastOfUTC = new angular.mock.TzDate(-5, '2010-09-03T12:05:08.000Z');        var westOfUTC = new angular.mock.TzDate(+5, '2010-09-03T12:05:08.000Z'); +      var eastOfUTCPartial = new angular.mock.TzDate(-5.5, '2010-09-03T12:05:08.000Z'); +      var westOfUTCPartial = new angular.mock.TzDate(+5.5, '2010-09-03T12:05:08.000Z');        expect(date(utc, "yyyy-MM-ddTHH:mm:ssZ")).                      toEqual('2010-09-03T12:05:08+0000') @@ -236,6 +238,12 @@ describe('filters', function() {        expect(date(westOfUTC, "yyyy-MM-ddTHH:mm:ssZ")).                      toEqual('2010-09-03T07:05:08-0500') + +      expect(date(eastOfUTCPartial, "yyyy-MM-ddTHH:mm:ssZ")). +                    toEqual('2010-09-03T17:35:08+0530') + +      expect(date(westOfUTCPartial, "yyyy-MM-ddTHH:mm:ssZ")). +                    toEqual('2010-09-03T06:35:08-0530')      });      it('should treat single quoted strings as string literals', function() {  | 
