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

Tests for mockUpdate.match #216 #217

Conversation

cristinawithout
Copy link
Contributor

@cristinawithout cristinawithout commented Jul 6, 2016

Here's some tests for mockUpdate().match().

The tests pass and it works how I need in my own app's tests when I copy the methods match(), extraRequestMatches(), and attributesMatch() from mock-create-request.js to mock-update-request.js.

But you probably want something cleaner than a copy/paste job. Not sure if there would be any variation for update. If not, maybe a 'mock-match-request' class with those methods which both create and update extend.

@cristinawithout
Copy link
Contributor Author

Went ahead and committed the update via a 'mock-request-match' class that both update and create inherit from. Feel free to use or go with a different approach.

@danielspaniel
Copy link
Collaborator

I am thinking that a mixin would be nicer .. they are hard to do with classes .. but I will give it a whirl
I am shocked that this was so easy .. how nice though.

Wish everything was that simple.

@danielspaniel
Copy link
Collaborator

All set .. converted to mixin style.
Will ship this out tomorrow

@danielspaniel danielspaniel merged commit 3b33c7a into adopted-ember-addons:master Jul 7, 2016
@danielspaniel
Copy link
Collaborator

v2.7.0-beta.10 has this new code .. thanks for the help 👍

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