Skip to content

Commit

Permalink
added test for afeld#15
Browse files Browse the repository at this point in the history
  • Loading branch information
dtao committed Dec 23, 2013
1 parent 6b90086 commit 17348a4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/server_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,22 @@ describe('app', function(){

});
});

it('should set the Accept header to "*/*" for "raw" requests', function(done){
var body = 'foo';

var destApp = express();
destApp.get('/', function(req, res){
expect(req.headers.accept).to.eql('*/*');
res.send('');
});
var server = http.createServer(destApp);
server.listen(8001, function(){

supertest(app)
.get('/')
.query({url: 'http://localhost:8001', raw: true})
.expect(200, done);
});
});
});

0 comments on commit 17348a4

Please sign in to comment.