Loay
06cb481c3f
Update eslint to loopback config v5
...
Notable side-effects:
- loopback no longer exports "caller" and "arguments" properties
- kv-memory connector is now properly added to the connector registry
- the file "test/support.js" was finally removed
2016-11-22 14:08:02 +01:00
Miroslav Bajtoš
6e1defcb18
Use strong-remoting's new TypeRegistry
2016-09-09 10:01:29 +02:00
Miroslav Bajtoš
f76edd5d61
Fix remoting metadata for "data" arguments
...
Fix the definition of "data" argument to
{ type: 'object', model: modelName, ... }
That way strong-remoting passed the request body directly to the model
method (does not create a new model instance), but the swagger will
still provide correct schema for these arguments.
This fixes a bug where upsert in relation methods was adding default
property values to request payload.
2016-09-07 14:27:58 +02:00
gunjpan
832e2c391c
Discard sugar method for model creation
...
Current implementation of `app.model(modelName, settings)`
works as a sugar for model creation. In 3.0, this is
not supported anymore. This implementation reports an
error when sugar is used for model creation.
Includes:
- Updated app.model() method
- Fixed test cases reflecting the change
2016-09-07 10:40:23 +02:00
jannyHou
19618209c8
Fix forceId in tests
2016-08-08 15:06:29 -04:00
David Cheung
ddb5327e64
Update tests for strong-error-handler
...
Fix rest-adapter related test case switching to strong-error-handler
Only affect the test-cases calling rest methods
2016-06-07 13:26:18 -04:00
Supasate Choochaisri
04e26fae5c
Separate error-checking and next/done logic from other logic in the test suite
...
Signed-off-by: Supasate Choochaisri <supasate.c@gmail.com>
2016-05-05 11:12:48 +07:00
Ryan Graham
6964914bab
update copyright statements
2016-05-03 15:50:21 -07:00
Miroslav Bajtoš
f9702b0ace
Use eslint with loopback config
...
Drop jshint and jscs in favour of eslint.
Fix style violations.
While we are at this, reduce the max line length from 150 to 100.
2016-04-06 10:45:30 +02:00
Ryan Graham
ef9ad587c8
test: fail on error instead of crash
...
If the supertest request fails its basic assertions, there may not even
be a body to perform checks against, so bail early when possible.
2016-02-04 15:35:19 +01:00
Simon Ho
186e3e8f92
Remove dependency on loopback-testing
...
- Copy depedent source from loopback-testing into test/helpers
- Removed loopback-testing from package.json
2015-12-31 15:59:03 -08:00
Raymond Feng
b5f702afd3
Fix the test case
2015-05-28 16:15:02 -07:00
Tom Kirkpatrick
d6c8d9725a
Fix code standards issues
2015-05-14 22:09:51 +02:00
Tom Kirkpatrick
8fa736517a
Add test case to highlight fatal error when trying to include a scoped relationship through a polymorphic relationship
2015-05-13 18:47:30 +02:00
Raymond Feng
12e19e36ea
Upgrade test fixtures to use LB 2.x layout
2015-04-20 09:23:44 -07:00
Raymond Feng
64ccb785c2
Fix the style issue
2015-04-02 08:45:04 -07:00
Fabien Franzen
93aefc36f5
Test embedsOne CRUD methods
2015-03-21 17:21:49 +01:00
Raymond Feng
2ce1d14a0e
Upgrade deps
2015-03-04 16:30:03 -08:00
Miroslav Bajtoš
c2236c393b
Upgrade jscs to ~1.11 via grunt-jscs ^1.5
2015-02-20 15:31:15 +01:00
Raymond Feng
bbba49d99c
Enable remoting for hasOne relations
2015-01-29 22:33:34 -08:00
Ron Edgecomb
a028d9d198
Add error code property to known error responses.
...
Enhance the error objects with a `code` property containing
a machine-readable string code describing the error, for example
INVALID_TOKEN or USER_NOT_FOUND.
Also improve 404 error messages to include the model name.
2015-01-21 19:04:47 +01:00
Clark Wang
58f67e92d1
fix jscs warning
...
Signed-off-by: Clark Wang <clark.wangs@gmail.com>
2015-01-04 18:24:29 +08:00
Clark Wang
94b2a45a6c
fix nestRemoting is nesting hooks from other relations
...
Signed-off-by: Clark Wang <clark.wangs@gmail.com>
2015-01-01 15:26:58 +08:00
Clark Wang
9c147f1b25
fix jshint errors
...
Signed-off-by: Clark Wang <clark.wangs@gmail.com>
2014-12-10 19:43:55 +08:00
Clark Wang
b204367aa6
fix nested remoting function throwing error will crash app
...
Signed-off-by: Clark Wang <clark.wangs@gmail.com>
2014-12-10 12:04:56 +08:00
Clark Wang
a12c2ece28
Prepend slash for nested remoting paths
...
Fix remoting paths of relation methods to correctly show
in API Explorer.
2014-11-27 09:56:44 +01:00
Rob Halff
36e1f6840c
fix jscs errors
2014-11-21 03:35:36 +01:00
Rob Halff
918497c365
singlequote, semicolon & /*jshint -W030 */
2014-11-21 02:46:21 +01:00
Raymond Feng
4c7c8901ff
Fix the model name for hasMany/through relation
2014-11-17 09:44:20 -08:00
Raymond Feng
28754519d4
Merge pull request #522 from clarkorz/feature/link-with-data
...
Support data field as body for link operation
2014-09-11 16:59:27 -07:00
Clark Wang
2452dd1092
Add tests for hasManyThrough link with data
...
Signed-off-by: Clark Wang <clark.wangs@gmail.com>
2014-09-01 09:28:13 +08:00
Fabien Franzen
1067c94bf6
Tiny fix: correct url format
2014-08-30 17:00:36 +02:00
Fabien Franzen
33f3ba4549
Fix embedsMany/findById to return proper 404 response
2014-08-30 16:54:14 +02:00
Raymond Feng
9b97014b52
Merge pull request #504 from fabien/feature/embeds-one-remoting
...
Enable remoting for embedsOne relation
2014-08-29 09:30:49 -07:00
Fabien Franzen
6cfd1bb523
Fix tests
2014-08-26 15:25:45 +02:00
Jaka Hudoklin
19155242c1
Enable remoting for embedsOne relation
...
Signed-off-by: Jaka Hudoklin <jakahudoklin@gmail.com>
2014-08-26 15:25:45 +02:00
Fabien Franzen
fc0c96bdc2
Allow 'where' argument for scoped count API
...
Note that the return value will be non-rooted, which is actually what
the
non-scoped /count method returns as well - fixes inconsistency.
2014-08-26 14:41:36 +02:00
Raymond Feng
1c61cedee7
Make sure scoped methods are remoted
...
See https://github.com/strongloop/loopback/issues/454 . It's regression in 2.x.
2014-08-08 15:55:47 -07:00
Raymond Feng
a9e77e0e23
Merge pull request #435 from fabien/feature/deep-remoting
...
Implement Model.nestRemoting
2014-08-07 10:38:09 -07:00
Fabien Franzen
539702ab3d
Inherit hooks when nesting
...
Note that for now, the hook ctx.instance will be the root/entry object.
Added `mounted` event - should be useful in other ways too.
2014-08-05 12:14:39 +02:00
Fabien Franzen
18c647a9bb
Changed options.path to options.http.path
2014-08-05 09:10:43 +02:00
Fabien Franzen
42f938ed72
Fix test to be more specific
2014-08-04 18:47:15 +02:00
Fabien Franzen
9be8d11431
Implement Model.nestRemoting
...
Explicitly enable another level of nesting/accessing relations; limited
to a depth of 2 levels.
2014-08-04 18:27:50 +02:00
Fabien Franzen
66fe60e6ca
Allow custom relation path (http) - enable hasOne remoting access
2014-08-01 11:25:28 +02:00
Raymond Feng
0590eaf278
Merge pull request #419 from fabien/feature/new-relations
...
Integration of the new juggler relations: embedsMany, referencesMany
2014-07-30 16:32:33 -07:00
Fabien Franzen
b9f27d71a8
Integration test: referencesMany
2014-07-30 15:01:22 +02:00
Fabien Franzen
514db0bc66
Integration test: embedsMany
2014-07-30 13:24:40 +02:00
Raymond Feng
e5b0e8cd70
Map exists to HEAD for REST
2014-07-28 09:37:50 -07:00
Raymond Feng
79f504a3c7
Merge branch 'master' into 2.0
2014-07-16 09:09:07 -07:00
Raymond Feng
f649c92bcf
Refine the test cases for relation REST APIs
2014-07-03 11:18:34 -07:00