mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-04-25 13:45:50 +08:00
18 lines
471 B
JavaScript
18 lines
471 B
JavaScript
var Resource = require('../lib/resource')
|
|
, Context = require('../lib/context')
|
|
, Stream = require('stream').Stream;
|
|
|
|
describe('Context', function() {
|
|
|
|
describe('.url', function() {
|
|
it('should not have the base url', function(done) {
|
|
freq('/foo/bar', null, function(req, res) {
|
|
var r = new Resource('foo', {});
|
|
var ctx = new Context(r, req, res, {});
|
|
|
|
expect(ctx.url).to.equal('/bar');
|
|
done();
|
|
});
|
|
});
|
|
});
|
|
}); |