@@ -50,15 +50,15 @@ describe('DS.loadRelations(resourceName, instance(Id), relations[, options]): ',
50
50
it ( 'should get an item from the server' , function ( ) {
51
51
DS . inject ( 'user' , user10 ) ;
52
52
53
- $httpBackend . expectGET ( 'http://test.angular-cache.com/organization/14' ) . respond ( 200 , organization14 ) ;
54
- $httpBackend . expectGET ( 'http://test.angular-cache.com/comment?userId=10' ) . respond ( 200 , [
53
+ $httpBackend . expectGET ( 'http://test.angular-cache.com/organization/14?userId=10 ' ) . respond ( 200 , organization14 ) ;
54
+ $httpBackend . expectGET ( 'http://test.angular-cache.com/user/10/ comment?userId=10' ) . respond ( 200 , [
55
55
comment11 ,
56
56
comment12 ,
57
57
comment13
58
58
] ) ;
59
59
$httpBackend . expectGET ( 'http://test.angular-cache.com/profile?userId=10' ) . respond ( 200 , profile15 ) ;
60
60
61
- DS . loadRelations ( 'user' , 10 , [ 'comment' , 'profile' , 'organization' ] ) . then ( function ( user ) {
61
+ DS . loadRelations ( 'user' , 10 , [ 'comment' , 'profile' , 'organization' ] , { params : { approvedBy : 10 } } ) . then ( function ( user ) {
62
62
assert . deepEqual ( user . comments , [
63
63
comment11 ,
64
64
comment12 ,
@@ -79,7 +79,6 @@ describe('DS.loadRelations(resourceName, instance(Id), relations[, options]): ',
79
79
assert . deepEqual ( comment . approvedByUser , user19 ) ;
80
80
} , fail ) ;
81
81
$httpBackend . flush ( ) ;
82
-
83
82
} ) ;
84
83
it ( 'should get an item from the server but not store it if cacheResponse is false' , function ( ) {
85
84
DS . inject ( 'user' , {
@@ -88,8 +87,8 @@ describe('DS.loadRelations(resourceName, instance(Id), relations[, options]): ',
88
87
organizationId : 14
89
88
} ) ;
90
89
91
- $httpBackend . expectGET ( 'http://test.angular-cache.com/organization/14' ) . respond ( 200 , organization14 ) ;
92
- $httpBackend . expectGET ( 'http://test.angular-cache.com/comment?userId=10' ) . respond ( 200 , [
90
+ $httpBackend . expectGET ( 'http://test.angular-cache.com/organization/14?userId=10 ' ) . respond ( 200 , organization14 ) ;
91
+ $httpBackend . expectGET ( 'http://test.angular-cache.com/user/10/ comment?userId=10' ) . respond ( 200 , [
93
92
comment11 ,
94
93
comment12 ,
95
94
comment13
@@ -121,8 +120,8 @@ describe('DS.loadRelations(resourceName, instance(Id), relations[, options]): ',
121
120
organizationId : 14
122
121
} ) ;
123
122
124
- $httpBackend . expectGET ( 'http://test.angular-cache.com/organization/14' ) . respond ( 404 , 'Not Found' ) ;
125
- $httpBackend . expectGET ( 'http://test.angular-cache.com/comment?userId=10' ) . respond ( 404 , 'Not Found' ) ;
123
+ $httpBackend . expectGET ( 'http://test.angular-cache.com/organization/14?userId=10 ' ) . respond ( 404 , 'Not Found' ) ;
124
+ $httpBackend . expectGET ( 'http://test.angular-cache.com/user/10/ comment?userId=10' ) . respond ( 404 , 'Not Found' ) ;
126
125
$httpBackend . expectGET ( 'http://test.angular-cache.com/profile?userId=10' ) . respond ( 404 , 'Not Found' ) ;
127
126
128
127
DS . loadRelations ( 'user' , 10 , [ 'comment' , 'profile' , 'organization' ] ) . then ( function ( ) {
0 commit comments