Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored tests, previous tests were not actually testing localStorage #11

Merged
merged 2 commits into from Dec 28, 2011

Conversation

kmiyashiro
Copy link
Contributor

I've refactored the tests to actually test every sync action of the persistence layer, the previous tests were just testing the collection (make changes to model in collection, test on model in collection). I also added tests for model specific Stores.

The previous tests also had a test that would fail, so I tweaked it. It was the test where you call save on a model and change the ID attribute. In practice, this actually clones the model in the persistence layer (saves based on ID), but changes it in the collection. You must fetch() to refresh from the store for them to be synced. This seems more like a bug to me, so feel free to change the test.

I also updated to Backbone 5.3

jeromegn added a commit that referenced this pull request Dec 28, 2011
Refactored tests, previous tests were not actually testing localStorage
@jeromegn jeromegn merged commit e31fe9a into jeromegn:master Dec 28, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants