Update the list of shared methods
This commit is contained in:
parent
e6e2a62e46
commit
e8ac3a960f
|
@ -96,14 +96,14 @@ Model.setup = function () {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Map the prototype method to /:id with data in the body
|
||||||
ModelCtor.sharedCtor.accepts = [
|
ModelCtor.sharedCtor.accepts = [
|
||||||
{arg: 'data', type: 'object', http: {source: 'body'}},
|
{arg: 'id', type: 'any', http: {source: 'path'}}
|
||||||
{arg: 'id', type: 'any', http: {source: 'url'}}
|
// {arg: 'instance', type: 'object', http: {source: 'body'}}
|
||||||
];
|
];
|
||||||
|
|
||||||
ModelCtor.sharedCtor.http = [
|
ModelCtor.sharedCtor.http = [
|
||||||
{path: '/'},
|
|
||||||
{path: '/:id'}
|
{path: '/:id'}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,8 @@ describe('DataSource', function() {
|
||||||
// -
|
// -
|
||||||
existsAndShared('_forDB', false);
|
existsAndShared('_forDB', false);
|
||||||
existsAndShared('create', true);
|
existsAndShared('create', true);
|
||||||
existsAndShared('updateOrCreate', false);
|
existsAndShared('updateOrCreate', true);
|
||||||
existsAndShared('upsert', false);
|
existsAndShared('upsert', true);
|
||||||
existsAndShared('findOrCreate', false);
|
existsAndShared('findOrCreate', false);
|
||||||
existsAndShared('exists', true);
|
existsAndShared('exists', true);
|
||||||
existsAndShared('find', true);
|
existsAndShared('find', true);
|
||||||
|
@ -57,10 +57,11 @@ describe('DataSource', function() {
|
||||||
existsAndShared('hasMany', false);
|
existsAndShared('hasMany', false);
|
||||||
existsAndShared('belongsTo', false);
|
existsAndShared('belongsTo', false);
|
||||||
existsAndShared('hasAndBelongsToMany', false);
|
existsAndShared('hasAndBelongsToMany', false);
|
||||||
existsAndShared('save', true);
|
existsAndShared('save', false);
|
||||||
existsAndShared('isNewRecord', false);
|
existsAndShared('isNewRecord', false);
|
||||||
existsAndShared('_adapter', false);
|
existsAndShared('_adapter', false);
|
||||||
existsAndShared('destroy', true);
|
existsAndShared('destroyById', true);
|
||||||
|
existsAndShared('destroy', false);
|
||||||
existsAndShared('updateAttributes', true);
|
existsAndShared('updateAttributes', true);
|
||||||
existsAndShared('reload', true);
|
existsAndShared('reload', true);
|
||||||
|
|
||||||
|
@ -70,4 +71,4 @@ describe('DataSource', function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue