Skip to content

Commit 49fe619

Browse files
committed
refined age tests
1 parent 4428c1f commit 49fe619

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

tests/other.js

+23-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default
2626
]
2727
},
2828
{
29-
name: 'HTTP cache updates the Age header',
29+
name: 'HTTP cache updates the Age header (Expires)',
3030
requests: [
3131
{
3232
response_headers: [
@@ -47,6 +47,28 @@ export default
4747
}
4848
]
4949
},
50+
{
51+
name: 'HTTP cache updates the Age header (CC: max-age)',
52+
requests: [
53+
{
54+
response_headers: [
55+
['Cache-Control', 'max-age=600'],
56+
['Date', 0],
57+
['Age', '30']
58+
],
59+
pause_after: true
60+
},
61+
{
62+
expected_type: 'cached',
63+
expected_response_headers: [
64+
['Age', function (assert, p, a) {
65+
assert.isTrue(a !== undefined, `${p} isn't present`)
66+
assert.isTrue(parseInt(a) > 32, `${p} is ${a}, should be bigger`)
67+
}]
68+
]
69+
}
70+
]
71+
},
5072
{
5173
name: 'HTTP cache doesn\'t update the Date header',
5274
requests: [

0 commit comments

Comments
 (0)