Skip to content

Commit

Permalink
Merge pull request #82 from appscot/test_count_through
Browse files Browse the repository at this point in the history
Adds test for through model `.count()`
  • Loading branch information
dmarcelino committed Apr 16, 2015
2 parents 6626754 + 4c0cd66 commit 124baa2
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ describe('Association Interface', function() {
.catch(done);
});

it('count joins: should return the number of through associations', function(done) {
Associations.Owns.count()
.then(function(count){
assert.equal(count, 1);
done();
})
.catch(done);
});

it('findOne: should not have team or friend records, nor edges', function(done) {
Associations.Stadium.findOne(stadiumRecord.id)
.then(function(stadium){
Expand Down

0 comments on commit 124baa2

Please sign in to comment.