Skip to content

Commit f187f31

Browse files
authored
Merge pull request #293 from lehni/test/count-transaction
Add test for transaction support in count()
2 parents f3ca643 + 2b68358 commit f187f31

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/postgresql.transaction.test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ describe('transactions', function() {
5353
function(err, posts) {
5454
if (err) return done(err);
5555
posts.length.should.be.eql(count);
56-
done();
56+
// Make sure both find() and count() behave the same way
57+
Post.count(where, options,
58+
function(err, result) {
59+
if (err) return done(err);
60+
result.should.be.eql(count);
61+
done();
62+
});
5763
});
5864
};
5965
}

0 commit comments

Comments
 (0)