express/test/res.location.js
2014-03-05 22:06:14 -08:00

23 lines
487 B
JavaScript

var express = require('../')
, request = require('supertest');
describe('res', function(){
describe('.location(url)', function(){
it('should set the header', function(done){
var app = express();
app.use(function(req, res){
res.location('http://google.com').end();
});
request(app)
.get('/')
.end(function(err, res){
res.headers.should.have.property('location', 'http://google.com');
done();
})
})
})
})