@@ -16,8 +16,8 @@ void main() {
16
16
test ('Resource id assigned on the server' , () async {
17
17
await client
18
18
.createNew ('posts' , attributes: {'title' : 'Hello world' }).then ((r) {
19
- expect (r.httpResponse.statusCode, 201 );
20
- expect (r.httpResponse.headers['location' ], ['/posts/${r .resource .id }' ]);
19
+ expect (r.rawResponse. httpResponse.statusCode, 201 );
20
+ expect (r.rawResponse. httpResponse.headers['location' ], ['/posts/${r .resource .id }' ]);
21
21
expect (r.links['self' ].toString (), '/posts/${r .resource .id }' );
22
22
expect (r.resource.type, 'posts' );
23
23
expect (r.resource.attributes['title' ], 'Hello world' );
@@ -30,8 +30,8 @@ void main() {
30
30
lid: 'lid' ,
31
31
attributes: {'title' : 'Hello world' },
32
32
one: {'self' : LocalIdentifier ('posts' , 'lid' )}).then ((r) {
33
- expect (r.httpResponse.statusCode, 201 );
34
- expect (r.httpResponse.headers['location' ], ['/posts/${r .resource .id }' ]);
33
+ expect (r.rawResponse. httpResponse.statusCode, 201 );
34
+ expect (r.rawResponse. httpResponse.headers['location' ], ['/posts/${r .resource .id }' ]);
35
35
expect (r.links['self' ].toString (), '/posts/${r .resource .id }' );
36
36
expect (r.resource.type, 'posts' );
37
37
expect (r.resource.attributes['title' ], 'Hello world' );
@@ -42,9 +42,9 @@ void main() {
42
42
test ('Resource id assigned on the client' , () async {
43
43
await client.create ('posts' , '12345' ,
44
44
attributes: {'title' : 'Hello world' }).then ((r) {
45
- expect (r.httpResponse.statusCode, 204 );
45
+ expect (r.rawResponse. httpResponse.statusCode, 204 );
46
46
expect (r.resource, isNull);
47
- expect (r.httpResponse.headers['location' ], isNull);
47
+ expect (r.rawResponse. httpResponse.headers['location' ], isNull);
48
48
});
49
49
});
50
50
});
0 commit comments