Test client DE fill for ints and floats

pull/1885/head
Jared Scheib 2017-09-07 12:50:50 -07:00
parent 2ab38d75e0
commit 97ef8a52b5
1 changed files with 24 additions and 0 deletions

View File

@ -418,5 +418,29 @@ describe('Chronograf.Reducers.DataExplorer.queryConfigs', () => {
expect(nextState[queryId].fill).to.equal(LINEAR)
})
it('updates fill to string integer value', () => {
const initialState = {
[queryId]: buildInitialState(queryId),
}
const INT_STRING = '1337'
const action = fill(queryId, INT_STRING)
const nextState = reducer(initialState, action)
expect(nextState[queryId].fill).to.equal(INT_STRING)
})
it('updates fill to string float value', () => {
const initialState = {
[queryId]: buildInitialState(queryId),
}
const FLOAT_STRING = '1.337'
const action = fill(queryId, FLOAT_STRING)
const nextState = reducer(initialState, action)
expect(nextState[queryId].fill).to.equal(FLOAT_STRING)
})
})
})