summary refs log tree commit diff
path: root/syweb/webclient/test/unit
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-11-14 15:34:19 +0000
committerKegan Dougal <kegan@matrix.org>2014-11-14 15:34:19 +0000
commitd4f6d65e1d3406453e43f289cdba3d06c7d64fe0 (patch)
tree54864c9b00384fe8fa3999a28271785a21df198a /syweb/webclient/test/unit
parentActually look for last_active_ago in the right place.. (diff)
downloadsynapse-d4f6d65e1d3406453e43f289cdba3d06c7d64fe0.tar.xz
Add extra checks to duration filter.
Diffstat (limited to 'syweb/webclient/test/unit')
-rw-r--r--syweb/webclient/test/unit/filters.spec.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/syweb/webclient/test/unit/filters.spec.js b/syweb/webclient/test/unit/filters.spec.js
index e8944cbfc2..fe31da709b 100644
--- a/syweb/webclient/test/unit/filters.spec.js
+++ b/syweb/webclient/test/unit/filters.spec.js
@@ -285,6 +285,11 @@ describe('duration filter', function() {
         var output = durationFilter(1000*60*60*2 + 1000*60*35);
         expect(output).toEqual("2h");
     });
+    
+    it("should represent -ve numbers as '0s'", function() {
+        var output = durationFilter(-2000);
+        expect(output).toEqual("0s");
+    });
 });
 
 describe('orderMembersList filter', function() {