diff --git a/packages/ember-routing/lib/location/auto_location.js b/packages/ember-routing/lib/location/auto_location.js index 8ee3869ed74..0f65478cf5a 100644 --- a/packages/ember-routing/lib/location/auto_location.js +++ b/packages/ember-routing/lib/location/auto_location.js @@ -70,9 +70,9 @@ export default EmberObject.extend({ @since 1.11 @property global - @default environment.global + @default window */ - global: environment.global, + global: environment.window, /** @private diff --git a/packages/ember-routing/tests/location/auto_location_test.js b/packages/ember-routing/tests/location/auto_location_test.js index e8d9f74f3bc..1f85628e782 100644 --- a/packages/ember-routing/tests/location/auto_location_test.js +++ b/packages/ember-routing/tests/location/auto_location_test.js @@ -1,3 +1,4 @@ +import { environment } from 'ember-environment'; import { get, run, assign } from 'ember-metal'; import AutoLocation from '../../location/auto_location'; import { @@ -60,6 +61,13 @@ QUnit.module('Ember.AutoLocation', { } }); +QUnit.test('AutoLocation should have the `global`', function(assert) { + let location = AutoLocation.create(); + + assert.ok(location.global, 'has a global defined'); + assert.strictEqual(location.global, environment.window, 'has the environments window global'); +}); + QUnit.test('AutoLocation should return concrete implementation\'s value for `getURL`', function() { expect(1);