helper function to test for query successes

This commit is contained in:
Brian Carlson 2011-01-21 15:13:58 -06:00
parent 56ba2567ce
commit 3fd8d3f853

View File

@ -88,6 +88,13 @@ assert.empty = function(actual) {
assert.length(actual, 0); assert.length(actual, 0);
}; };
assert.success = function(callback) {
assert.calls(function(err, arg) {
assert.isNull(err);
callback(arg);
})
}
assert.length = function(actual, expectedLength) { assert.length = function(actual, expectedLength) {
assert.equal(actual.length, expectedLength); assert.equal(actual.length, expectedLength);