2 var express = require('../')
3 , request = require('supertest');
5 describe('req', function(){
6 describe('.acceptsEncodings', function () {
7 it('should be true if encoding accepted', function(done){
10 app.use(function(req, res){
11 req.acceptsEncodings('gzip').should.be.ok()
12 req.acceptsEncodings('deflate').should.be.ok()
18 .set('Accept-Encoding', ' gzip, deflate')
22 it('should be false if encoding not accepted', function(done){
25 app.use(function(req, res){
26 req.acceptsEncodings('bogus').should.not.be.ok()
32 .set('Accept-Encoding', ' gzip, deflate')