Browse Source

Fixed a test case that broke when we upgraded sift.

Tony Ennis 11 years ago
parent
commit
51c7910581
1 changed files with 3 additions and 4 deletions
  1. 3 4
      test/lib/pipeline/Pipeline.js

+ 3 - 4
test/lib/pipeline/Pipeline.js

@@ -121,10 +121,9 @@ module.exports = {
 			},
 
 			"should call callback with errors from pipeline components": function (next) {
-				var p = Pipeline.parseCommand({pipeline:[{$match:{$foo:{bar:"baz"}}}]});
-				p.run(new DocumentSource({}), function(err, results){
-					assert(err instanceof Error);
-					return next();
+				// The $foo part is invalid and causes a throw.
+				assert.throws(function(){
+					Pipeline.parseCommand({pipeline:[{$match:{$foo:{bar:"baz"}}}]});
 				});
 			}