couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject [1/2] fauxton commit: updated refs/heads/master to a06c648
Date Thu, 13 Oct 2016 14:35:17 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master fd758c015 -> a06c64884


add tests for encoding issue


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

Branch: refs/heads/master
Commit: a06c64884b4f86e00f774e0e810018c4513269fe
Parents: ef1ecc8
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Thu Oct 13 16:33:09 2016 +0200
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Thu Oct 13 16:34:52 2016 +0200

----------------------------------------------------------------------
 app/core/tests/utilsSpec.js | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a06c6488/app/core/tests/utilsSpec.js
----------------------------------------------------------------------
diff --git a/app/core/tests/utilsSpec.js b/app/core/tests/utilsSpec.js
index c5632f5..326e8ab 100644
--- a/app/core/tests/utilsSpec.js
+++ b/app/core/tests/utilsSpec.js
@@ -47,6 +47,18 @@ describe('Utils', function () {
     });
   });
 
+  describe('safeURLName', function () {
+
+    it('is idempotent', function () {
+      assert.equal('foo-bar%2Fbaz', utils.safeURLName(utils.safeURLName('foo-bar/baz')));
+      assert.equal('foo-bar%2Bbaz', utils.safeURLName(utils.safeURLName('foo-bar+baz')));
+    });
+
+    it('encodes special chars', function () {
+      assert.equal('foo-bar%2Fbaz', utils.safeURLName('foo-bar/baz'));
+    });
+  });
+
   describe('isSystemDatabase', function () {
 
     it('detects system databases', function () {


Mime
View raw message