couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michel...@apache.org
Subject fauxton commit: updated refs/heads/master to 1b1fb3d
Date Fri, 17 Apr 2015 20:47:33 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 1847ef8d2 -> 1b1fb3d76


Add test for hasDataSize function


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/1b1fb3d7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/1b1fb3d7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/1b1fb3d7

Branch: refs/heads/master
Commit: 1b1fb3d76e21f0e350f215a519fa8d1886acfdea
Parents: 1847ef8
Author: michellephung@gmail.com <michellephung@gmail.com>
Authored: Fri Apr 17 11:48:09 2015 -0400
Committer: michellephung@gmail.com <michellephung@gmail.com>
Committed: Fri Apr 17 11:48:09 2015 -0400

----------------------------------------------------------------------
 app/addons/databases/tests/resourcesSpec.js | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/1b1fb3d7/app/addons/databases/tests/resourcesSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/tests/resourcesSpec.js b/app/addons/databases/tests/resourcesSpec.js
index 2980dd2..cf3289d 100644
--- a/app/addons/databases/tests/resourcesSpec.js
+++ b/app/addons/databases/tests/resourcesSpec.js
@@ -34,6 +34,19 @@ define([
         assert.ok(modelWithGraveYard.isGraveYard());
         assert.ok(!modelWithoutGraveYard.isGraveYard());
       });
+
+      it("can tell whether the data size showing is accurate or not", function () {
+        var modelWithDataSize = new Resources.Status({
+          other: 6,
+          data_size: 5,
+          disk_size: 2
+        });
+        assert.ok(modelWithDataSize.hasDataSize());
+
+        var empty_probably_fetching_model = new Resources.Status({});
+        assert.notOk(empty_probably_fetching_model.hasDataSize());
+      });
+
     });
 
     describe('List of Databases', function () {


Mime
View raw message