1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/app/components/app/signature-request/tests/signature-request.test.js
Erik Marks 2df8b85c5f
LoginPerSite: Support multiple accounts without automatic switching (#8079)
* transaction editing: use txParams 'from' account

* signature-request: use txParams 'from' account

* signature-request-original: use txParams 'from' account

* encryption/decryption: use txParams 'from' account

* update tests

* set 'send' state 'from' address in confirm containers
2020-03-06 13:34:56 -08:00

32 lines
906 B
JavaScript

import React from 'react'
import assert from 'assert'
import shallow from '../../../../../lib/shallow-with-context'
import SignatureRequest from '../signature-request.component'
describe('Signature Request Component', function () {
describe('render', function () {
const fromAddress = '0x123456789abcdef'
it('should render a div with one child', function () {
const wrapper = shallow((
<SignatureRequest
clearConfirmTransaction={() => {}}
cancel={() => {}}
sign={() => {}}
txData={{
msgParams: {
data: '{"message": {"from": {"name": "hello"}}}',
from: fromAddress,
},
}}
fromAccount={{ address: fromAddress }}
/>
))
assert(wrapper.is('div'))
assert.equal(wrapper.length, 1)
assert(wrapper.hasClass('signature-request'))
})
})
})