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 test to ensure multiple stores get unique instances of serializ… #5301

Merged
merged 1 commit into from
Dec 22, 2017

Conversation

bmac
Copy link
Member

@bmac bmac commented Dec 22, 2017

…ers and adapters

@rwjblue
Copy link
Member

rwjblue commented Dec 22, 2017

Thank you for putting this together!

let serializer_a = env.store_a.serializerFor('home-planet');
let serializer_b = env.store_b.serializerFor('home-planet');

assert.notEqual(serializer_a, serializer_b);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add more assertions here?

Specifically, we don't actually care that they aren't the same instance (not really at least), what we care about is that .store on them is the right thing.

assert.equal(get(serializer_a, 'store'), env.store_a);
assert.equal(get(serializer_b, 'store'), env.store_b);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@rwjblue rwjblue merged commit c897e9a into emberjs:master Dec 22, 2017
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.

2 participants