-
Notifications
You must be signed in to change notification settings - Fork 50
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
Example of a component test using can()
helper?
#13
Comments
You're running into two issues here. The first ( The second issue you're running into is because the resolver does not know how to look up resolver.pluralizedTypes.ability = 'abilities'; Then I've placed an example you can look at here. You'll probably want to check out the resolver.js and test. I'm also going to make a PR with documentation updates to help people along with testing. |
Fixes minutebase#11, Resolves minutebase#8, Resolves minutebase#13.
Fixes minutebase#11, Resolves minutebase#8, Resolves minutebase#13.
Fixes minutebase#11, Resolves minutebase#8, Resolves minutebase#13.
This is related to #8, but different. I worked through doing unit tests of our abilities and seem to have acceptance tests (with full use of initializers and the container) running smoothly, but I'm hitting some snags when trying to run a contained unit test of a component.
I hit this one first:
The below seems to resolve that issue (although I wonder if we should make a test helper to make this simpler and ease implementation changes in the future? I might be able to help there ...):
But now I'm hitting a second error regarding auto-loading abilities:
The
app/abilities/forms.js
ability is properly setup and works in the UI (and in acceptance tests). But thinking about it, in essence I'm running a mini-acceptance test (just for a component). Which would be why the initializers you use to setup the abilities aren't working.Any suggestions / pointers on how to handle things here?
The text was updated successfully, but these errors were encountered: