pathable / supermodel

Supermodel - Minimal Model Tracking for Backbonejs
http://pathable.github.io/supermodel
MIT License
229 stars 36 forks source link

Fix for unit test of issue #50 #69

Closed jmlamare closed 9 years ago

jmlamare commented 9 years ago

This unit test failed because the object user was added twice into the collection membership The method collection.add was recursively called:

test('has.One and has.Many should play nicly together', function(t) { var user = User.create({id: 1}); var memberships = user.memberships().add({id: 1, user_id: 1}) t.is(user.memberships().length, 1); t.end(); });