mirror of
https://github.com/expressjs/express.git
synced 2026-02-21 19:41:36 +00:00
23 lines
465 B
JavaScript
23 lines
465 B
JavaScript
|
|
var express = require('../')
|
|
, request = require('./support/http');
|
|
|
|
describe('req', function(){
|
|
describe('.path', function(){
|
|
it('should return the parsed pathname', function(done){
|
|
var app = express();
|
|
|
|
app.use(function(req, res){
|
|
res.end(req.path);
|
|
});
|
|
|
|
request(app)
|
|
.get('/login?redirect=/post/1/comments')
|
|
.end(function(res){
|
|
res.body.should.equal('/login');
|
|
done();
|
|
})
|
|
})
|
|
})
|
|
})
|