I’m trying to test a small service I have that adds navigation items to a navigation component in the route.
I tried injecting the service at the top of the unit test for the index route like so
moduleFor('route:index', 'Unit | Route | index', {
navigationService: Ember.inject.service('navigation')
});
And then in the test I have this
var navItemsLength = this.get('navigationService').get('navigationMenuItems').length
But my test output says
TypeError: this.get is not a function
What is the proper way to get that info out of the service?