aboutsummaryrefslogtreecommitdiffstats
path: root/test/AngularSpec.js
diff options
context:
space:
mode:
authorIgor Minar2010-11-06 23:50:04 -0700
committerIgor Minar2010-11-08 22:49:29 -0800
commit1a43f36e2395c77005fd14fafd43808548b111f2 (patch)
tree456581194d95374b8654e4e0357fcf1f366c62c9 /test/AngularSpec.js
parent1c305dc67a73b8096132c709ee1a2f83879aab98 (diff)
downloadangular.js-1a43f36e2395c77005fd14fafd43808548b111f2.tar.bz2
Add isDate method + fix old code
Diffstat (limited to 'test/AngularSpec.js')
-rw-r--r--test/AngularSpec.js13
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);
+ });
+});