diff options
| author | Igor Minar | 2012-03-27 08:05:07 -0700 | 
|---|---|---|
| committer | Igor Minar | 2012-03-28 16:30:31 -0700 | 
| commit | da9f4dfcf4f3d0c21821d8474ac0bb19a3c51415 (patch) | |
| tree | c70b8e9b3db5bd5a266ea7156ee7312c3cd80554 /test/ngMock/angular-mocksSpec.js | |
| parent | ac4318a2fa5c6d306dbc19466246292a81767fca (diff) | |
| download | angular.js-da9f4dfcf4f3d0c21821d8474ac0bb19a3c51415.tar.bz2 | |
feat(TzDate): add support for toISOString method
Diffstat (limited to 'test/ngMock/angular-mocksSpec.js')
| -rw-r--r-- | test/ngMock/angular-mocksSpec.js | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/test/ngMock/angular-mocksSpec.js b/test/ngMock/angular-mocksSpec.js index d80b1976..c656e940 100644 --- a/test/ngMock/angular-mocksSpec.js +++ b/test/ngMock/angular-mocksSpec.js @@ -63,6 +63,17 @@ describe('ngMock', function() {      }); +    it('should fake toISOString method', function() { +      var date = new angular.mock.TzDate(-1, '2009-10-09T01:02:03.027Z'); + +      if (new Date().toISOString) { +        expect(date.toISOString()).toEqual('2009-10-09T01:02:03.027Z'); +      } else { +        expect(date.toISOString).toBeUndefined(); +      } +    }); + +      it('should fake getHours method', function() {        //0 in -3h        var t0 = new angular.mock.TzDate(-3, 0); | 
