diff options
| author | Brian Ford | 2013-10-08 14:40:44 -0700 | 
|---|---|---|
| committer | Brian Ford | 2013-10-09 10:18:51 -0700 | 
| commit | 1366556ace3e71f9e4abe63554050ddf9c0dabb6 (patch) | |
| tree | c36a3ac0eebc3a44a51bb7f1a464b12e712dc3f7 | |
| parent | fe65932404f518ff41e98a0fd5158c8c26a666f3 (diff) | |
| download | angular.js-1366556ace3e71f9e4abe63554050ddf9c0dabb6.tar.bz2 | |
test(filters): fix timezone-dependent test
Closes #4218
| -rw-r--r-- | test/ng/filter/filtersSpec.js | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/test/ng/filter/filtersSpec.js b/test/ng/filter/filtersSpec.js index cd83437f..2d648b65 100644 --- a/test/ng/filter/filtersSpec.js +++ b/test/ng/filter/filtersSpec.js @@ -247,7 +247,10 @@ describe('filters', function() {      });      it('should accept negative numbers as strings', function() { -      expect(date('-1')).toEqual('Dec 31, 1969'); +      //Note: this tests a timestamp set for 3 days before the unix epoch. +      //The behavior of `date` depends on your timezone, which is why we check just +      //the year and not the whole daye. See Issue #4218 +      expect(date('-259200000').split(' ')[2]).toEqual('1969');      });      it('should format timezones correctly (as per ISO_8601)', function() { | 
