mysterious casperjs errors....

This commit is contained in:
Peter Cottle 2015-03-28 13:59:19 -07:00
parent 1afd48bb39
commit 8493b51ec2
7 changed files with 80 additions and 18 deletions

View file

@ -1,10 +1,6 @@
var AppConstants = require('../constants/AppConstants');
var AppDispatcher = require('../dispatcher/AppDispatcher');
var LocaleActions = require('../actions/LocaleActions');
var LocaleStore = require('../stores/LocaleStore');
var ActionTypes = AppConstants.ActionTypes;
describe('LocaleStore', function() {
it('has default locale', function() {

View file

@ -14,6 +14,13 @@ var LocaleActions = {
});
},
changeLocaleFromURI: function(newLocale) {
AppDispatcher.handleURIAction({
type: ActionTypes.CHANGE_LOCALE,
locale: newLocale
});
},
changeLocaleFromHeader: function(header) {
AppDispatcher.handleViewAction({
type: ActionTypes.CHANGE_LOCALE_FROM_HEADER,

View file

@ -217,7 +217,7 @@ var initDemo = function(sandbox) {
}
if (params.locale !== undefined && params.locale.length) {
LocaleActions.changeLocale(params.locale);
LocaleActions.changeLocaleFromURI(params.locale);
} else {
tryLocaleDetect();
}