fixed out of date tests

This commit is contained in:
Ritchie Martori
2012-06-19 11:33:11 -07:00
parent 119328712e
commit e948afdbef
4 changed files with 3 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ function Files(settings) {
util.inherits(Files, Resource);
Files.prototype.handle = function (ctx, next) {
if(ctx.req.method !== 'GET') return next();
if(ctx.req && ctx.req.method !== 'GET') return next();
if(ctx.url && ctx.url[ctx.url.length - 1] === '/') ctx.url + 'index.html';
var fpath = path.join(this.public, ctx.url);
fs.stat(fpath, function(err, stat) {

File diff suppressed because one or more lines are too long

0
test/support/mongopid Normal file
View File

View File

@@ -83,7 +83,7 @@ describe('UserCollection', function() {
};
var found = false;
uc.store.find = function(query, fn) {
expect(query).to.eql({id: '123'});
expect(query).to.eql({id: '123', $fields: {password: 0}});
found = true;
fn();
}