diff options
| author | Igor Minar | 2010-11-06 23:50:04 -0700 | 
|---|---|---|
| committer | Igor Minar | 2010-11-08 22:49:29 -0800 | 
| commit | 1a43f36e2395c77005fd14fafd43808548b111f2 (patch) | |
| tree | 456581194d95374b8654e4e0357fcf1f366c62c9 /test/AngularSpec.js | |
| parent | 1c305dc67a73b8096132c709ee1a2f83879aab98 (diff) | |
| download | angular.js-1a43f36e2395c77005fd14fafd43808548b111f2.tar.bz2 | |
Add isDate method + fix old code
Diffstat (limited to 'test/AngularSpec.js')
| -rw-r--r-- | test/AngularSpec.js | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/test/AngularSpec.js b/test/AngularSpec.js index b00aa631..23f06887 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -328,3 +328,16 @@ describe('angular service', function() {      expect(result.third).toBeTruthy();    });  }); + +describe('isDate', function() { +  it('should return true for Date object', function() { +    expect(isDate(new Date())).toBe(true); +  }); + +  it('should return false for non Date objects', function() { +    expect(isDate([])).toBe(false); +    expect(isDate('')).toBe(false); +    expect(isDate(23)).toBe(false); +    expect(isDate({})).toBe(false); +  }); +}); | 
