mirror of
https://github.com/zebrajr/express.git
synced 2025-12-07 00:19:54 +01:00
20 lines
404 B
JavaScript
20 lines
404 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')
|
|
.expect('/login', done);
|
|
})
|
|
})
|
|
})
|