res.location.js
This file
Path
test/res.location.js
22 lines · 487 bytes · JavaScript
Last changed by
Not known.
History of this fileTake it
1234567891011121314151617181920212223
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(); }) }) })})