Update tests
This commit is contained in:
parent
cc8d748a47
commit
2669ed1c23
|
@ -26,7 +26,7 @@
|
|||
- [Model.find(id, callback)](#model-modelfindid-callback)
|
||||
- [Model.count([query], callback)](#model-modelcountquery-callback)
|
||||
- [Remote Methods](#model-remote-methods)
|
||||
- [example remote method](#model-remote-methods-example-remote-method)
|
||||
- [Example Remote Method](#model-remote-methods-example-remote-method)
|
||||
- [Model.beforeRemote(name, fn)](#model-remote-methods-modelbeforeremotename-fn)
|
||||
- [Model.afterRemote(name, fn)](#model-remote-methods-modelafterremotename-fn)
|
||||
- [Remote Method invoking context](#model-remote-methods-remote-method-invoking-context)
|
||||
|
@ -437,8 +437,8 @@ Query count of Model instances in data source.
|
|||
<a name="model-remote-methods"></a>
|
||||
## Remote Methods
|
||||
<a name="model-remote-methods-example-remote-method"></a>
|
||||
### example remote method
|
||||
should allow calling remotely.
|
||||
### Example Remote Method
|
||||
Call the method using HTTP / REST.
|
||||
|
||||
```js
|
||||
request(app)
|
||||
|
|
|
@ -270,8 +270,8 @@ describe('Model', function() {
|
|||
app.model(User);
|
||||
});
|
||||
|
||||
describe('example remote method', function () {
|
||||
it('should allow calling remotely', function(done) {
|
||||
describe('Example Remote Method', function () {
|
||||
it('Call the method using HTTP / REST', function(done) {
|
||||
request(app)
|
||||
.get('/users/sign-in?username=foo&password=bar')
|
||||
.expect('Content-Type', /json/)
|
||||
|
|
|
@ -16,10 +16,8 @@ beforeEach(function () {
|
|||
assertValidDataSource = function (dataSource) {
|
||||
// has methods
|
||||
assert.isFunc(dataSource, 'createModel');
|
||||
// assert.isFunc(dataSource, 'discover');
|
||||
// assert.isFunc(dataSource, 'discoverSync');
|
||||
assert.isFunc(dataSource, 'discoverAndBuildModels');
|
||||
assert.isFunc(dataSource, 'discoverAndBuildModelsSync');
|
||||
assert.isFunc(dataSource, 'discoverModelDefinitions');
|
||||
assert.isFunc(dataSource, 'discoverSchema');
|
||||
assert.isFunc(dataSource, 'enable');
|
||||
assert.isFunc(dataSource, 'disable');
|
||||
assert.isFunc(dataSource, 'defineOperation');
|
||||
|
|
Loading…
Reference in New Issue