Skip to content

Commit

Permalink
[BUGFIX beta] Fix auto location test for old browser
Browse files Browse the repository at this point in the history
Stub `AutoLocation._getSupportsHistory` to test `AutoLocation`
behavior on hash location.
This stub is needed on old browser such as IE8.
  • Loading branch information
tricknotes committed May 27, 2014
1 parent 6555b15 commit 92ee0dc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/ember/tests/location_test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import "ember";
import copy from "ember-runtime/copy";

var App;
var App, AutoTestLocation;

QUnit.module('AutoLocation', {
setup: function() {
Ember.AutoLocation._location = {
AutoTestLocation = copy(Ember.AutoLocation);

AutoTestLocation._getSupportsHistory = function () {
return true;
};

AutoTestLocation._location = {
href: 'http://test.com/',
pathname: '/rootdir/subdir',
hash: '',
Expand All @@ -23,6 +30,7 @@ QUnit.module('AutoLocation', {
location: 'none',
rootURL: '/rootdir/'
});
App.__container__.register('location:auto', AutoTestLocation );
App.deferReadiness();
});
},
Expand Down

0 comments on commit 92ee0dc

Please sign in to comment.