Skip to content

Commit

Permalink
Fixed js tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vera-liu committed Nov 22, 2016
1 parent 0b12beb commit fb40a7d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions superset/assets/spec/javascripts/explorev2/actions_spec.js
Expand Up @@ -7,11 +7,12 @@ import { exploreReducer } from '../../../javascripts/explorev2/reducers/exploreR
describe('reducers', () => {
it('sets correct field value given a key and value', () => {
const newState = exploreReducer(
initialState('dist_bar'), actions.setFieldValue('x_axis_label', 'x'));
initialState('dist_bar'), actions.setFieldValue('table', 'x_axis_label', 'x'));
expect(newState.viz.form_data.x_axis_label).to.equal('x');
});
it('toggles a boolean field value given only a key', () => {
const newState = exploreReducer(initialState('dist_bar'), actions.setFieldValue('show_legend'));
const newState = exploreReducer(initialState('dist_bar'),
actions.setFieldValue('table', 'show_legend'));
expect(newState.viz.form_data.show_legend).to.equal(false);
});
});

0 comments on commit fb40a7d

Please sign in to comment.