1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/test/unit/actions/warning_test.js

21 lines
626 B
JavaScript
Raw Normal View History

import assert from 'assert'
import freeze from 'deep-freeze-strict'
import * as actions from '../../../ui/app/store/actions'
import reducers from '../../../ui/app/ducks'
2017-05-04 23:35:10 +02:00
describe('action DISPLAY_WARNING', function () {
it('sets appState.warning to provided value', function () {
const initialState = {
appState: {},
}
freeze(initialState)
const warningText = 'This is a sample warning message'
const action = actions.displayWarning(warningText)
const resultingState = reducers(initialState, action)
assert.equal(resultingState.appState.warning, warningText, 'warning text set')
2017-05-04 23:35:10 +02:00
})
})