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
|
language: dart
|
||||||
dart:
|
dart:
|
||||||
|
- stable
|
||||||
- dev
|
- dev
|
|
@ -73,16 +73,16 @@ main() async {
|
||||||
});
|
});
|
||||||
|
|
||||||
test('invalidate', () async {
|
test('invalidate', () async {
|
||||||
await client.sendUnstreamed(
|
await client.sendUnstreamed('PURGE', '/date.txt', {});
|
||||||
'PURGE', '/date.txt', {});
|
|
||||||
var response = await client.get('/date.txt');
|
var response = await client.get('/date.txt');
|
||||||
print('Response after invalidation: ${response.body}');
|
print('Response after invalidation: ${response.body}');
|
||||||
expect(response.body, isNot(response1.body));
|
expect(response.body, isNot(response1.body));
|
||||||
});
|
});
|
||||||
|
|
||||||
test('sends 304 on if-modified-since', () async {
|
test('sends 304 on if-modified-since', () async {
|
||||||
var response = await client.get('/date.txt',
|
var headers = {'if-modified-since': formatDateForHttp(lastModified)};
|
||||||
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}');
|
print('Response (${response.statusCode}): ${response.headers}');
|
||||||
expect(response.statusCode, 304);
|
expect(response.statusCode, 304);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue