I have a mixin that has the following injection:
My unit test fails:
var WorkflowCommonObject = Ember.Object.extend(WorkflowCommonMixin); var subject = WorkflowCommonObject.create(this.container); assert.ok(subject);; });
with the following error:
Assertion Failed: Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.
How do I inject the controller into the mixin or how do i create the object via a container so my test would pass?
I have similar other scenarios where I need to inject services into the mixin but can’t figure out a way to stub the services. I tried the registring in the setup function but that doesn’t work in mixins - it worked everywhere else though.