|
|
|
@ -41,7 +41,7 @@ module.exports.tests.functional_success = function(test, common) {
|
|
|
|
|
|
|
|
|
|
test('functional success', function(t) { |
|
|
|
|
var backend = mockBackend( 'client/mget/ok/1', function( cmd ){ |
|
|
|
|
t.deepEqual(cmd, { body: { docs: [ { _id: 123, _index: 'pelias', type: [ 'a' ] } ] } }, 'correct backend command'); |
|
|
|
|
t.deepEqual(cmd, { body: { docs: [ { _id: 123, _index: 'pelias', _type: [ 'a' ] } ] } }, 'correct backend command'); |
|
|
|
|
}); |
|
|
|
|
var controller = setup( backend ); |
|
|
|
|
var res = { |
|
|
|
@ -70,7 +70,7 @@ module.exports.tests.functional_success = function(test, common) {
|
|
|
|
|
module.exports.tests.functional_failure = function(test, common) { |
|
|
|
|
test('functional failure', function(t) { |
|
|
|
|
var backend = mockBackend( 'client/mget/fail/1', function( cmd ){ |
|
|
|
|
t.deepEqual(cmd, { body: { docs: [ { _id: 123, _index: 'pelias', type: [ 'b' ] } ] } }, 'correct backend command'); |
|
|
|
|
t.deepEqual(cmd, { body: { docs: [ { _id: 123, _index: 'pelias', _type: [ 'b' ] } ] } }, 'correct backend command'); |
|
|
|
|
}); |
|
|
|
|
var controller = setup( backend ); |
|
|
|
|
var req = { clean: { ids: [ {'id' : 123, types: [ 'b' ] } ] }, errors: [], warnings: [] }; |
|
|
|
|