Alonski / realworld-ember

This repository is deprecated. Please visit:
https://github.com/gothinkster/ember-realworld-example-app
5 stars 0 forks source link

Fix failing tests #16

Closed alexlafroscia closed 7 years ago

alexlafroscia commented 7 years ago

This isn't as good as actually fleshing these tests out, but at least it gets them passing in CI.

The problem was that unit tests need things it depends on from the container to be explicitly stated, but I didn't configure that when I set up ember-simple-auth. Telling the tests that they need to register the session service was enough to get the basic tests passing again.

Alonski commented 7 years ago

Do you know if this is the recommended way to do this or is there a way to inject or stub the service that makes more sense? Anyways looks good

alexlafroscia commented 7 years ago

This is fine, and I think for the session service, would be the correct way. ember-simple-auth has some test helpers for stubbing out your session for a test, so we'd want to use the "real" service and those helpers rather than a stub anyway.