Update cache_test
This commit is contained in:
parent
b33cd06e70
commit
0b4a232f98
2 changed files with 5 additions and 4 deletions
|
@ -1,3 +1,4 @@
|
|||
language: dart
|
||||
dart:
|
||||
- stable
|
||||
- dev
|
|
@ -73,16 +73,16 @@ main() async {
|
|||
});
|
||||
|
||||
test('invalidate', () async {
|
||||
await client.sendUnstreamed(
|
||||
'PURGE', '/date.txt', {});
|
||||
await client.sendUnstreamed('PURGE', '/date.txt', {});
|
||||
var response = await client.get('/date.txt');
|
||||
print('Response after invalidation: ${response.body}');
|
||||
expect(response.body, isNot(response1.body));
|
||||
});
|
||||
|
||||
test('sends 304 on if-modified-since', () async {
|
||||
var response = await client.get('/date.txt',
|
||||
headers: {'if-modified-since': formatDateForHttp(lastModified)});
|
||||
var headers = {'if-modified-since': formatDateForHttp(lastModified)};
|
||||
var response = await client.get('/date.txt', headers: headers);
|
||||
print('Sending headers: $headers');
|
||||
print('Response (${response.statusCode}): ${response.headers}');
|
||||
expect(response.statusCode, 304);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue