summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Kowalski <rok@kowalski.gd>2014-05-13 18:08:45 +0200
committerRobert Kowalski <rok@kowalski.gd>2014-05-13 18:09:36 +0200
commitad8e28c8037416d56d2c527045063cb7cd927869 (patch)
treeba13a0888c0022026599c7e85c6b5459de5e609d
parent95600b70e6cd36e460cc06958f624954419aa9e1 (diff)
downloadcouchdb-ad8e28c8037416d56d2c527045063cb7cd927869.tar.gz
Fauxton: fix loading of pouch
Added a red test which turned green
-rw-r--r--src/Makefile.am1
-rw-r--r--src/fauxton/app/addons/documents/tests/viewsSpec.js23
-rw-r--r--src/fauxton/app/addons/pouchdb/base.js2
-rw-r--r--src/fauxton/app/addons/pouchdb/pouch.collate.js2
-rw-r--r--src/fauxton/app/addons/pouchdb/pouchdb.mapreduce.js4
5 files changed, 28 insertions, 4 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index f09d31305..1e3515d91 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -152,6 +152,7 @@ FAUXTON_FILES = \
fauxton/app/addons/documents/resources.js \
fauxton/app/addons/documents/routes.js \
fauxton/app/addons/documents/tests/resourcesSpec.js \
+ fauxton/app/addons/documents/tests/viewsSpec.js \
fauxton/app/addons/documents/views.js \
fauxton/app/addons/fauxton/base.js \
fauxton/app/addons/fauxton/components.js \
diff --git a/src/fauxton/app/addons/documents/tests/viewsSpec.js b/src/fauxton/app/addons/documents/tests/viewsSpec.js
new file mode 100644
index 000000000..8bc1397bf
--- /dev/null
+++ b/src/fauxton/app/addons/documents/tests/viewsSpec.js
@@ -0,0 +1,23 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+define([
+ 'addons/documents/views',
+ 'testUtils'
+], function (Views, testUtils) {
+ var assert = testUtils.assert;
+
+ describe('DocumentsViews', function () {
+ it('should load', function () {
+ assert.equal(typeof Views.Views.Changes, 'function');
+ });
+ });
+});
diff --git a/src/fauxton/app/addons/pouchdb/base.js b/src/fauxton/app/addons/pouchdb/base.js
index 69962bb11..3cd2b43e9 100644
--- a/src/fauxton/app/addons/pouchdb/base.js
+++ b/src/fauxton/app/addons/pouchdb/base.js
@@ -22,7 +22,7 @@ define([
"api",
// Modules
- "addons/pouchdb/pouchdb.mapreduce.js"
+ "addons/pouchdb/pouchdb.mapreduce"
],
function(app, FauxtonAPI, MapReduce) {
diff --git a/src/fauxton/app/addons/pouchdb/pouch.collate.js b/src/fauxton/app/addons/pouchdb/pouch.collate.js
index 8f1580819..e48ab850f 100644
--- a/src/fauxton/app/addons/pouchdb/pouch.collate.js
+++ b/src/fauxton/app/addons/pouchdb/pouch.collate.js
@@ -21,7 +21,7 @@ define([
"api",
// Modules
- "addons/pouchdb/pouch.collate.js"
+ "addons/pouchdb/pouch.collate"
],
function(app, FauxtonAPI, Collate) {
diff --git a/src/fauxton/app/addons/pouchdb/pouchdb.mapreduce.js b/src/fauxton/app/addons/pouchdb/pouchdb.mapreduce.js
index 502e0eb01..30e01e5ab 100644
--- a/src/fauxton/app/addons/pouchdb/pouchdb.mapreduce.js
+++ b/src/fauxton/app/addons/pouchdb/pouchdb.mapreduce.js
@@ -29,7 +29,7 @@ define([
"api",
// Modules
- "addons/pouchdb/pouch.collate.js"
+ "addons/pouchdb/pouch.collate"
],
function(app, FauxtonAPI, Collate) {
@@ -90,7 +90,7 @@ function(app, FauxtonAPI, Collate) {
id: current.doc._id,
key: key,
value: val
- };
+ };
//console.log("VIEW ROW: ", viewRow);
if (options.startkey && Pouch.collate(key, options.startkey) < 0) return;