mirror of
https://github.com/zebrajr/express.git
synced 2025-12-06 12:19:51 +01:00
Test location with leading ./ and containing ..
This commit is contained in:
parent
9c0de23645
commit
c9865b821d
|
|
@ -86,6 +86,23 @@ describe('res', function(){
|
|||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('with leading ./ and containing ..', function(){
|
||||
it('should construct path-relative urls', function(done){
|
||||
var app = express();
|
||||
|
||||
app.use(function(req, res){
|
||||
res.location('./skip/../../new').end();
|
||||
});
|
||||
|
||||
request(app)
|
||||
.get('/post/1')
|
||||
.end(function(err, res){
|
||||
res.headers.should.have.property('location', '/post/new');
|
||||
done();
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('without leading /', function(){
|
||||
it('should construct mount-point relative urls', function(done){
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user