diff options
| author | Sujeet Pillai | 2013-03-14 17:19:13 +0530 | 
|---|---|---|
| committer | Misko Hevery | 2013-03-14 22:16:54 -0700 | 
| commit | 1c1cd4fdf6b6d7511c7b8dc61b8042011dc54830 (patch) | |
| tree | ca7f814ba9c3283811c1efb63bee7d39aae8fcfc /test | |
| parent | 79049b9fee5690b8370c51e0fbb82d7a16b787fc (diff) | |
| download | angular.js-1c1cd4fdf6b6d7511c7b8dc61b8042011dc54830.tar.bz2 | |
fix(timezone): correct timezone date filter for 1/2 hour offsets
Diffstat (limited to 'test')
| -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 071902a9..2ed99cf1 100644 --- a/test/ng/filter/filtersSpec.js +++ b/test/ng/filter/filtersSpec.js @@ -236,6 +236,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') @@ -245,6 +247,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() {  | 
