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

Add a "push" strategy #7

Open
lukemelia opened this issue Dec 30, 2013 · 3 comments
Open

Add a "push" strategy #7

lukemelia opened this issue Dec 30, 2013 · 3 comments

Comments

@lukemelia
Copy link

create triggers a save on the record; build creates the record and leaves it in an uncommitted state. It would be nice to have push, which adds the record to the store in a committed state without going through save in the test.

Thoughts?

@teddyzeenny
Copy link
Owner

+1 this should be pretty straightforward to do after the ED refactor.

@teddyzeenny
Copy link
Owner

Something like

Factory.push = function(store, type, props) { 
  return store.push(type, Factory.attr(store, type, props)); 
}

@lukemelia
Copy link
Author

yeppers. Looks good.

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

No branches or pull requests

2 participants