diff options
| author | Maxim Grach | 2013-02-01 11:41:28 +0600 | 
|---|---|---|
| committer | Igor Minar | 2013-02-07 02:28:33 -0800 | 
| commit | df744f3af46fc227a934f16cb63c7a6038e7133b (patch) | |
| tree | 01ffb1ec1048745c2dbb5f8f66f2c1c5326232ff /test/ngMock/angular-mocksSpec.js | |
| parent | 8155c3a29ea0eb14806913b8ac08ba7727e1969c (diff) | |
| download | angular.js-df744f3af46fc227a934f16cb63c7a6038e7133b.tar.bz2 | |
feat(dateFilter): add `[.,]sss` formatter for milliseconds
Also Implement getMilliseconds() method of TzDate and
add test for this in ngMock.
Diffstat (limited to 'test/ngMock/angular-mocksSpec.js')
| -rw-r--r-- | test/ngMock/angular-mocksSpec.js | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/test/ngMock/angular-mocksSpec.js b/test/ngMock/angular-mocksSpec.js index d95f3003..176c5c92 100644 --- a/test/ngMock/angular-mocksSpec.js +++ b/test/ngMock/angular-mocksSpec.js @@ -109,6 +109,13 @@ describe('ngMock', function() {      }); +    it('should fake getMilliseconds method', function() { +      expect(new angular.mock.TzDate(0, '2010-09-03T23:05:08.003Z').getMilliseconds()).toBe(3); +      expect(new angular.mock.TzDate(0, '2010-09-03T23:05:08.023Z').getMilliseconds()).toBe(23); +      expect(new angular.mock.TzDate(0, '2010-09-03T23:05:08.123Z').getMilliseconds()).toBe(123); +    }); + +      it('should create a date representing new year in Bratislava', function() {        var newYearInBratislava = new angular.mock.TzDate(-1, '2009-12-31T23:00:00.000Z');        expect(newYearInBratislava.getTimezoneOffset()).toBe(-60); @@ -117,6 +124,7 @@ describe('ngMock', function() {        expect(newYearInBratislava.getDate()).toBe(1);        expect(newYearInBratislava.getHours()).toBe(0);        expect(newYearInBratislava.getMinutes()).toBe(0); +      expect(newYearInBratislava.getSeconds()).toBe(0);      }); | 
