mirror of
https://github.com/strapi/strapi.git
synced 2025-07-30 12:29:30 +00:00
32 lines
783 B
JavaScript
Executable File
32 lines
783 B
JavaScript
Executable File
'use strict';
|
|
|
|
const response = require('../helpers/context').response;
|
|
|
|
describe('res.etag=', function () {
|
|
it('should not modify an etag with quotes', function () {
|
|
const res = response();
|
|
res.etag = '"asdf"';
|
|
res.header.etag.should.equal('"asdf"');
|
|
});
|
|
|
|
it('should not modify a weak etag', function () {
|
|
const res = response();
|
|
res.etag = 'W/"asdf"';
|
|
res.header.etag.should.equal('W/"asdf"');
|
|
});
|
|
|
|
it('should add quotes around an etag if necessary', function () {
|
|
const res = response();
|
|
res.etag = 'asdf';
|
|
res.header.etag.should.equal('"asdf"');
|
|
});
|
|
});
|
|
|
|
describe('res.etag', function () {
|
|
it('should return etag', function () {
|
|
const res = response();
|
|
res.etag = '"asdf"';
|
|
res.etag.should.equal('"asdf"');
|
|
});
|
|
});
|