diff --git a/addon/mixins/authenticated-route-mixin.js b/addon/mixins/authenticated-route-mixin.js index f570cb9ea..fb4a13ead 100644 --- a/addon/mixins/authenticated-route-mixin.js +++ b/addon/mixins/authenticated-route-mixin.js @@ -1,4 +1,5 @@ import Ember from 'ember'; +import getOwner from 'ember-getowner-polyfill'; import Configuration from './../configuration'; const { inject: { service }, Mixin, assert, computed } = Ember; diff --git a/addon/mixins/unauthenticated-route-mixin.js b/addon/mixins/unauthenticated-route-mixin.js index e921f4238..4a233f044 100644 --- a/addon/mixins/unauthenticated-route-mixin.js +++ b/addon/mixins/unauthenticated-route-mixin.js @@ -1,4 +1,5 @@ import Ember from 'ember'; +import getOwner from 'ember-getowner-polyfill'; import Configuration from './../configuration'; const { inject: { service }, Mixin, assert, computed } = Ember; @@ -53,7 +54,7 @@ export default Mixin.create({ @param {Transition} transition The transition that lead to this route @public */ - beforeModel() { + beforeModel(transition) { if (this.get('session').get('isAuthenticated')) { if (!this.get('_isFastBoot')) { transition.abort(); diff --git a/tests/helpers/fake-cookie-service.js b/tests/helpers/fake-cookie-service.js index e59c54dfb..a929a328d 100644 --- a/tests/helpers/fake-cookie-service.js +++ b/tests/helpers/fake-cookie-service.js @@ -1,8 +1,8 @@ import Ember from 'ember'; -const { isNone } = Ember; +const { Object: EmberObject, isNone } = Ember; -export default Ember.Object.extend({ +export default EmberObject.extend({ init() { this._super(...arguments); diff --git a/tests/unit/mixins/authenticated-route-mixin-test.js b/tests/unit/mixins/authenticated-route-mixin-test.js index bbc94620d..855be151e 100644 --- a/tests/unit/mixins/authenticated-route-mixin-test.js +++ b/tests/unit/mixins/authenticated-route-mixin-test.js @@ -26,7 +26,8 @@ describe('AuthenticatedRouteMixin', () => { session = InternalSession.create({ store: EphemeralStore.create() }); transition = { - send() {} + send() {}, + abort() {} }; route = Route.extend(MixinImplementingBeforeModel, AuthenticatedRouteMixin, { diff --git a/tests/unit/mixins/unauthenticated-route-mixin-test.js b/tests/unit/mixins/unauthenticated-route-mixin-test.js index 6906350c3..7adf9354a 100644 --- a/tests/unit/mixins/unauthenticated-route-mixin-test.js +++ b/tests/unit/mixins/unauthenticated-route-mixin-test.js @@ -26,7 +26,8 @@ describe('UnauthenticatedRouteMixin', () => { session = InternalSession.create({ store: EphemeralStore.create() }); transition = { - send() {} + send() {}, + abort() {} }; route = Route.extend(MixinImplementingBeforeModel, UnauthenticatedRouteMixin, {