Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 8 additions and 8 deletions.
  1. +1 −1  backbone-couch.js
  2. +7 −7 test/test.js
View
2  backbone-couch.js
@@ -51,7 +51,7 @@ module.exports = function(config) {
var url = '_design/backbone/_rewrite' + getUrl(model);
db.view(url, {}, function(err, res) {
if (err) return error(err);
- data = [];
+ var data = [];
_.each(res.rows, function(val) {
data.push(val.doc);
});
View
14 test/test.js
@@ -16,7 +16,7 @@ var error = function(db) {
// Install and destroy database.
// -----------------------------
exports['install'] = function() {
- var couch = require('backbone-couch')({name: 'backbone_couch_test_install'});
+ var couch = require('../backbone-couch')({name: 'backbone_couch_test_install'});
var db = couch.db;
couch.install(function(err) {
assert.isNull(err);
@@ -36,7 +36,7 @@ exports['install'] = function() {
// Create db, save documents, load documents, destroy documents, destroy db.
// -------------------------------------------------------------------------
exports['save'] = function() {
- var couch = require('backbone-couch')({name: 'backbone_couch_test_save'});
+ var couch = require('../backbone-couch')({name: 'backbone_couch_test_save'});
var db = couch.db;
TestNumber.prototype.sync = couch.sync;
couch.install(function(err) {
@@ -76,7 +76,7 @@ exports['save'] = function() {
// Use a view to load a collection.
// --------------------------------
exports['view'] = function() {
- var couch = require('backbone-couch')({name: 'backbone_couch_test_view'});
+ var couch = require('../backbone-couch')({name: 'backbone_couch_test_view'});
var db = couch.db;
// Exend TestNumber to not interfere with concurrently running save test.
var ViewNumber = TestNumber.extend({});
@@ -118,7 +118,7 @@ exports['view'] = function() {
// Test custom design docs
// -----------------------
exports['custom'] = function() {
- var couch = require('backbone-couch')({name: 'backbone_couch_test_custom'});
+ var couch = require('../backbone-couch')({name: 'backbone_couch_test_custom'});
var db = couch.db;
var ViewNumber = TestNumber.extend({});
var ViewNumbers = TestNumbers.extend({
@@ -139,9 +139,9 @@ exports['custom'] = function() {
"from": "/api/Number",
"to": "_view/custom",
"query": {
- "limit": 2,
- "descending": true,
- "include_docs": true
+ "limit": "2",
+ "descending": "true",
+ "include_docs": "true"
}
}
]

No commit comments for this range

Something went wrong with that request. Please try again.