1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-28 23:06:37 +01:00
metamask-extension/ui/app/components/send/send-content/send-to-row/tests/send-to-row-selectors.test.js
Dan b3d78ed8a1 Remove send_ directory, revert to just having send
Revert accidentally changed constants.

Require defaults in ens-input, gas-fee-display and confirm screens.
2018-07-16 12:58:32 -02:30

48 lines
931 B
JavaScript

import assert from 'assert'
import {
getToDropdownOpen,
sendToIsInError,
} from '../send-to-row.selectors.js'
describe('send-to-row selectors', () => {
describe('getToDropdownOpen()', () => {
it('should return send.getToDropdownOpen', () => {
const state = {
send: {
toDropdownOpen: false,
},
}
assert.equal(getToDropdownOpen(state), false)
})
})
describe('sendToIsInError()', () => {
it('should return true if send.errors.to is truthy', () => {
const state = {
send: {
errors: {
to: 'abc',
},
},
}
assert.equal(sendToIsInError(state), true)
})
it('should return false if send.errors.to is falsy', () => {
const state = {
send: {
errors: {
to: null,
},
},
}
assert.equal(sendToIsInError(state), false)
})
})
})