Add test fixtures for shared methods

This commit is contained in:
Simon Ho 2015-09-18 19:13:08 -07:00
parent 9a33602458
commit 716ed4569f
54 changed files with 951 additions and 0 deletions

View File

@ -0,0 +1,3 @@
module.exports = function(Todo) {
};

View File

@ -0,0 +1,18 @@
{
"name": "Todo",
"base": "PersistedModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {
"content": {
"type": "string",
"required": true
}
},
"validations": [],
"relations": {},
"acls": [],
"methods": {}
}

View File

@ -0,0 +1,32 @@
{
"restApiRoot": "/api",
"host": "0.0.0.0",
"port": 3000,
"remoting": {
"context": {
"enableHttpContext": false
},
"rest": {
"normalizeHttpPath": false,
"xml": false
},
"json": {
"strict": false,
"limit": "100kb"
},
"urlencoded": {
"extended": true,
"limit": "100kb"
},
"cors": false,
"errorHandler": {
"disableStackTrace": false
},
"sharedMethods": {
"*": false,
"destroyAll": true
}
},
"legacyExplorer": false
}

View File

@ -0,0 +1,6 @@
{
"db": {
"name": "db",
"connector": "memory"
}
}

View File

@ -0,0 +1,46 @@
{
"_meta": {
"sources": [
"loopback/common/models",
"loopback/server/models",
"../common/models",
"./models"
],
"mixins": [
"loopback/common/mixins",
"loopback/server/mixins",
"../common/mixins",
"./mixins"
]
},
"User": {
"dataSource": "db"
},
"AccessToken": {
"dataSource": "db",
"public": false
},
"ACL": {
"dataSource": "db",
"public": false
},
"RoleMapping": {
"dataSource": "db",
"public": false
},
"Role": {
"dataSource": "db",
"public": false
},
"Todo": {
"dataSource": "db",
"public": true,
"options": {
"remoting": {
"sharedMethods": {
"destroyAll": false
}
}
}
}
}

View File

@ -0,0 +1,6 @@
var boot = require('loopback-boot');
var loopback = require('../../../../../index');
var app = module.exports = loopback();
boot(app, __dirname);
app.use(loopback.rest());

View File

@ -0,0 +1,3 @@
module.exports = function(Todo) {
};

View File

@ -0,0 +1,18 @@
{
"name": "Todo",
"base": "PersistedModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {
"content": {
"type": "string",
"required": true
}
},
"validations": [],
"relations": {},
"acls": [],
"methods": {}
}

View File

@ -0,0 +1,31 @@
{
"restApiRoot": "/api",
"host": "0.0.0.0",
"port": 3000,
"remoting": {
"context": {
"enableHttpContext": false
},
"rest": {
"normalizeHttpPath": false,
"xml": false
},
"json": {
"strict": false,
"limit": "100kb"
},
"urlencoded": {
"extended": true,
"limit": "100kb"
},
"cors": false,
"errorHandler": {
"disableStackTrace": false
},
"sharedMethods": {
"*": false
}
},
"legacyExplorer": false
}

View File

@ -0,0 +1,6 @@
{
"db": {
"name": "db",
"connector": "memory"
}
}

View File

@ -0,0 +1,39 @@
{
"_meta": {
"sources": [
"loopback/common/models",
"loopback/server/models",
"../common/models",
"./models"
],
"mixins": [
"loopback/common/mixins",
"loopback/server/mixins",
"../common/mixins",
"./mixins"
]
},
"User": {
"dataSource": "db"
},
"AccessToken": {
"dataSource": "db",
"public": false
},
"ACL": {
"dataSource": "db",
"public": false
},
"RoleMapping": {
"dataSource": "db",
"public": false
},
"Role": {
"dataSource": "db",
"public": false
},
"Todo": {
"dataSource": "db",
"public": true
}
}

View File

@ -0,0 +1,6 @@
var boot = require('loopback-boot');
var loopback = require('../../../../../index');
var app = module.exports = loopback();
boot(app, __dirname);
app.use(loopback.rest());

View File

@ -0,0 +1,3 @@
module.exports = function(Todo) {
};

View File

@ -0,0 +1,18 @@
{
"name": "Todo",
"base": "PersistedModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {
"content": {
"type": "string",
"required": true
}
},
"validations": [],
"relations": {},
"acls": [],
"methods": {}
}

View File

@ -0,0 +1,31 @@
{
"restApiRoot": "/api",
"host": "0.0.0.0",
"port": 3000,
"remoting": {
"context": {
"enableHttpContext": false
},
"rest": {
"normalizeHttpPath": false,
"xml": false
},
"json": {
"strict": false,
"limit": "100kb"
},
"urlencoded": {
"extended": true,
"limit": "100kb"
},
"cors": false,
"errorHandler": {
"disableStackTrace": false
},
"sharedMethods": {
"*": true
}
},
"legacyExplorer": false
}

View File

@ -0,0 +1,6 @@
{
"db": {
"name": "db",
"connector": "memory"
}
}

View File

@ -0,0 +1,39 @@
{
"_meta": {
"sources": [
"loopback/common/models",
"loopback/server/models",
"../common/models",
"./models"
],
"mixins": [
"loopback/common/mixins",
"loopback/server/mixins",
"../common/mixins",
"./mixins"
]
},
"User": {
"dataSource": "db"
},
"AccessToken": {
"dataSource": "db",
"public": false
},
"ACL": {
"dataSource": "db",
"public": false
},
"RoleMapping": {
"dataSource": "db",
"public": false
},
"Role": {
"dataSource": "db",
"public": false
},
"Todo": {
"dataSource": "db",
"public": true
}
}

View File

@ -0,0 +1,6 @@
var boot = require('loopback-boot');
var loopback = require('../../../../../index');
var app = module.exports = loopback();
boot(app, __dirname);
app.use(loopback.rest());

View File

@ -0,0 +1,3 @@
module.exports = function(Todo) {
};

View File

@ -0,0 +1,18 @@
{
"name": "Todo",
"base": "PersistedModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {
"content": {
"type": "string",
"required": true
}
},
"validations": [],
"relations": {},
"acls": [],
"methods": {}
}

View File

@ -0,0 +1,31 @@
{
"restApiRoot": "/api",
"host": "0.0.0.0",
"port": 3000,
"remoting": {
"context": {
"enableHttpContext": false
},
"rest": {
"normalizeHttpPath": false,
"xml": false
},
"json": {
"strict": false,
"limit": "100kb"
},
"urlencoded": {
"extended": true,
"limit": "100kb"
},
"cors": false,
"errorHandler": {
"disableStackTrace": false
},
"sharedMethods": {
"find": false
}
},
"legacyExplorer": false
}

View File

@ -0,0 +1,6 @@
{
"db": {
"name": "db",
"connector": "memory"
}
}

View File

@ -0,0 +1,39 @@
{
"_meta": {
"sources": [
"loopback/common/models",
"loopback/server/models",
"../common/models",
"./models"
],
"mixins": [
"loopback/common/mixins",
"loopback/server/mixins",
"../common/mixins",
"./mixins"
]
},
"User": {
"dataSource": "db"
},
"AccessToken": {
"dataSource": "db",
"public": false
},
"ACL": {
"dataSource": "db",
"public": false
},
"RoleMapping": {
"dataSource": "db",
"public": false
},
"Role": {
"dataSource": "db",
"public": false
},
"Todo": {
"dataSource": "db",
"public": true
}
}

View File

@ -0,0 +1,6 @@
var boot = require('loopback-boot');
var loopback = require('../../../../../index');
var app = module.exports = loopback();
boot(app, __dirname);
app.use(loopback.rest());

View File

@ -0,0 +1,3 @@
module.exports = function(Todo) {
};

View File

@ -0,0 +1,18 @@
{
"name": "Todo",
"base": "PersistedModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {
"content": {
"type": "string",
"required": true
}
},
"validations": [],
"relations": {},
"acls": [],
"methods": {}
}

View File

@ -0,0 +1,31 @@
{
"restApiRoot": "/api",
"host": "0.0.0.0",
"port": 3000,
"remoting": {
"context": {
"enableHttpContext": false
},
"rest": {
"normalizeHttpPath": false,
"xml": false
},
"json": {
"strict": false,
"limit": "100kb"
},
"urlencoded": {
"extended": true,
"limit": "100kb"
},
"cors": false,
"errorHandler": {
"disableStackTrace": false
},
"sharedMethods": {
"find": true
}
},
"legacyExplorer": false
}

View File

@ -0,0 +1,6 @@
{
"db": {
"name": "db",
"connector": "memory"
}
}

View File

@ -0,0 +1,39 @@
{
"_meta": {
"sources": [
"loopback/common/models",
"loopback/server/models",
"../common/models",
"./models"
],
"mixins": [
"loopback/common/mixins",
"loopback/server/mixins",
"../common/mixins",
"./mixins"
]
},
"User": {
"dataSource": "db"
},
"AccessToken": {
"dataSource": "db",
"public": false
},
"ACL": {
"dataSource": "db",
"public": false
},
"RoleMapping": {
"dataSource": "db",
"public": false
},
"Role": {
"dataSource": "db",
"public": false
},
"Todo": {
"dataSource": "db",
"public": true
}
}

View File

@ -0,0 +1,6 @@
var boot = require('loopback-boot');
var loopback = require('../../../../../index');
var app = module.exports = loopback();
boot(app, __dirname);
app.use(loopback.rest());

View File

@ -0,0 +1,3 @@
module.exports = function(Todo) {
};

View File

@ -0,0 +1,18 @@
{
"name": "Todo",
"base": "PersistedModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {
"content": {
"type": "string",
"required": true
}
},
"validations": [],
"relations": {},
"acls": [],
"methods": {}
}

View File

@ -0,0 +1,28 @@
{
"restApiRoot": "/api",
"host": "0.0.0.0",
"port": 3000,
"remoting": {
"context": {
"enableHttpContext": false
},
"rest": {
"normalizeHttpPath": false,
"xml": false
},
"json": {
"strict": false,
"limit": "100kb"
},
"urlencoded": {
"extended": true,
"limit": "100kb"
},
"cors": false,
"errorHandler": {
"disableStackTrace": false
}
},
"legacyExplorer": false
}

View File

@ -0,0 +1,6 @@
{
"db": {
"name": "db",
"connector": "memory"
}
}

View File

@ -0,0 +1,46 @@
{
"_meta": {
"sources": [
"loopback/common/models",
"loopback/server/models",
"../common/models",
"./models"
],
"mixins": [
"loopback/common/mixins",
"loopback/server/mixins",
"../common/mixins",
"./mixins"
]
},
"User": {
"dataSource": "db"
},
"AccessToken": {
"dataSource": "db",
"public": false
},
"ACL": {
"dataSource": "db",
"public": false
},
"RoleMapping": {
"dataSource": "db",
"public": false
},
"Role": {
"dataSource": "db",
"public": false
},
"Todo": {
"dataSource": "db",
"public": true,
"options": {
"remoting": {
"sharedMethods": {
"*": false
}
}
}
}
}

View File

@ -0,0 +1,6 @@
var boot = require('loopback-boot');
var loopback = require('../../../../../index');
var app = module.exports = loopback();
boot(app, __dirname);
app.use(loopback.rest());

View File

@ -0,0 +1,3 @@
module.exports = function(Todo) {
};

View File

@ -0,0 +1,18 @@
{
"name": "Todo",
"base": "PersistedModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {
"content": {
"type": "string",
"required": true
}
},
"validations": [],
"relations": {},
"acls": [],
"methods": {}
}

View File

@ -0,0 +1,28 @@
{
"restApiRoot": "/api",
"host": "0.0.0.0",
"port": 3000,
"remoting": {
"context": {
"enableHttpContext": false
},
"rest": {
"normalizeHttpPath": false,
"xml": false
},
"json": {
"strict": false,
"limit": "100kb"
},
"urlencoded": {
"extended": true,
"limit": "100kb"
},
"cors": false,
"errorHandler": {
"disableStackTrace": false
}
},
"legacyExplorer": false
}

View File

@ -0,0 +1,6 @@
{
"db": {
"name": "db",
"connector": "memory"
}
}

View File

@ -0,0 +1,46 @@
{
"_meta": {
"sources": [
"loopback/common/models",
"loopback/server/models",
"../common/models",
"./models"
],
"mixins": [
"loopback/common/mixins",
"loopback/server/mixins",
"../common/mixins",
"./mixins"
]
},
"User": {
"dataSource": "db"
},
"AccessToken": {
"dataSource": "db",
"public": false
},
"ACL": {
"dataSource": "db",
"public": false
},
"RoleMapping": {
"dataSource": "db",
"public": false
},
"Role": {
"dataSource": "db",
"public": false
},
"Todo": {
"dataSource": "db",
"public": true,
"options": {
"remoting": {
"sharedMethods": {
"*": true
}
}
}
}
}

View File

@ -0,0 +1,6 @@
var boot = require('loopback-boot');
var loopback = require('../../../../../index');
var app = module.exports = loopback();
boot(app, __dirname);
app.use(loopback.rest());

View File

@ -0,0 +1,3 @@
module.exports = function(Todo) {
};

View File

@ -0,0 +1,18 @@
{
"name": "Todo",
"base": "PersistedModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {
"content": {
"type": "string",
"required": true
}
},
"validations": [],
"relations": {},
"acls": [],
"methods": {}
}

View File

@ -0,0 +1,28 @@
{
"restApiRoot": "/api",
"host": "0.0.0.0",
"port": 3000,
"remoting": {
"context": {
"enableHttpContext": false
},
"rest": {
"normalizeHttpPath": false,
"xml": false
},
"json": {
"strict": false,
"limit": "100kb"
},
"urlencoded": {
"extended": true,
"limit": "100kb"
},
"cors": false,
"errorHandler": {
"disableStackTrace": false
}
},
"legacyExplorer": false
}

View File

@ -0,0 +1,6 @@
{
"db": {
"name": "db",
"connector": "memory"
}
}

View File

@ -0,0 +1,46 @@
{
"_meta": {
"sources": [
"loopback/common/models",
"loopback/server/models",
"../common/models",
"./models"
],
"mixins": [
"loopback/common/mixins",
"loopback/server/mixins",
"../common/mixins",
"./mixins"
]
},
"User": {
"dataSource": "db"
},
"AccessToken": {
"dataSource": "db",
"public": false
},
"ACL": {
"dataSource": "db",
"public": false
},
"RoleMapping": {
"dataSource": "db",
"public": false
},
"Role": {
"dataSource": "db",
"public": false
},
"Todo": {
"dataSource": "db",
"public": true,
"options": {
"remoting": {
"sharedMethods": {
"find": false
}
}
}
}
}

View File

@ -0,0 +1,6 @@
var boot = require('loopback-boot');
var loopback = require('../../../../../index');
var app = module.exports = loopback();
boot(app, __dirname);
app.use(loopback.rest());

View File

@ -0,0 +1,3 @@
module.exports = function(Todo) {
};

View File

@ -0,0 +1,18 @@
{
"name": "Todo",
"base": "PersistedModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {
"content": {
"type": "string",
"required": true
}
},
"validations": [],
"relations": {},
"acls": [],
"methods": {}
}

View File

@ -0,0 +1,28 @@
{
"restApiRoot": "/api",
"host": "0.0.0.0",
"port": 3000,
"remoting": {
"context": {
"enableHttpContext": false
},
"rest": {
"normalizeHttpPath": false,
"xml": false
},
"json": {
"strict": false,
"limit": "100kb"
},
"urlencoded": {
"extended": true,
"limit": "100kb"
},
"cors": false,
"errorHandler": {
"disableStackTrace": false
}
},
"legacyExplorer": false
}

View File

@ -0,0 +1,6 @@
{
"db": {
"name": "db",
"connector": "memory"
}
}

View File

@ -0,0 +1,46 @@
{
"_meta": {
"sources": [
"loopback/common/models",
"loopback/server/models",
"../common/models",
"./models"
],
"mixins": [
"loopback/common/mixins",
"loopback/server/mixins",
"../common/mixins",
"./mixins"
]
},
"User": {
"dataSource": "db"
},
"AccessToken": {
"dataSource": "db",
"public": false
},
"ACL": {
"dataSource": "db",
"public": false
},
"RoleMapping": {
"dataSource": "db",
"public": false
},
"Role": {
"dataSource": "db",
"public": false
},
"Todo": {
"dataSource": "db",
"public": true,
"options": {
"remoting": {
"sharedMethods": {
"find": true
}
}
}
}
}

View File

@ -0,0 +1,6 @@
var boot = require('loopback-boot');
var loopback = require('../../../../../index');
var app = module.exports = loopback();
boot(app, __dirname);
app.use(loopback.rest());