Commit 5546e8e
Michael Leaney
Add a test for nested resources from a
This test identifies an issue I am currently having with `addRestangularMethod`.
Given the following code.
```js
var Accounts = Restangular.withConfig(function(RestangularConfigurer) {
RestangularConfigurer.addElementTransformer('users', true, function(worker) {
worker.addRestangularMethod('doSomething', 'get', 'do-something');
return worker;
});
}).service('accounts');
Accounts.doSomething().then(function(doSomething) {
doSomething.one('foo').get();
});
```
I would expect `doSomething.one('foo').get()` to fetch `accounts/do-something/foo`,
and not `accounts/foo`.addRestangularMethod result1 parent 91be864 commit 5546e8e
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
612 | 632 | | |
613 | 633 | | |
614 | 634 | | |
| |||
0 commit comments