Skip to content

Commit

Permalink
Fix tests for fastboot feature branch (#1034)
Browse files Browse the repository at this point in the history
  • Loading branch information
josemarluedke authored and marcoow committed Jul 28, 2016
1 parent 1acbecf commit ebba60e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions addon/mixins/authenticated-route-mixin.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 2 additions & 1 deletion addon/mixins/unauthenticated-route-mixin.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions tests/helpers/fake-cookie-service.js
Original file line number Diff line number Diff line change
@@ -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);

Expand Down
3 changes: 2 additions & 1 deletion tests/unit/mixins/authenticated-route-mixin-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ describe('AuthenticatedRouteMixin', () => {

session = InternalSession.create({ store: EphemeralStore.create() });
transition = {
send() {}
send() {},
abort() {}
};

route = Route.extend(MixinImplementingBeforeModel, AuthenticatedRouteMixin, {
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/mixins/unauthenticated-route-mixin-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ describe('UnauthenticatedRouteMixin', () => {

session = InternalSession.create({ store: EphemeralStore.create() });
transition = {
send() {}
send() {},
abort() {}
};

route = Route.extend(MixinImplementingBeforeModel, UnauthenticatedRouteMixin, {
Expand Down

0 comments on commit ebba60e

Please sign in to comment.