Browse Source

Test headers can contain status code

header-formatting
Luke Childs 8 years ago
parent
commit
b07e091270
  1. 13
      test/headers.js

13
test/headers.js

@ -39,3 +39,16 @@ test('headers can be passed in as a string', t => {
t.true(isEqual(expired.on(headers), date));
tk.reset();
});
test('headers can contain status code', t => {
const date = new Date().toUTCString();
const headers = `
HTTP/1.1 200 OK
Date: ${date}
Age: 0
Cache-Control public, max-age=0`;
tk.freeze(date);
t.true(isEqual(expired.on(headers), date));
tk.reset();
});

Loading…
Cancel
Save