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