mirror of
https://github.com/zebrajr/express.git
synced 2025-12-06 12:19:51 +01:00
23 lines
487 B
JavaScript
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();
|
|
})
|
|
})
|
|
})
|
|
})
|