You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
951 B
30 lines
951 B
4 years ago
|
import React from 'react';
|
||
4 years ago
|
import { shallowWithContext } from '../../../../test/lib/render-helpers';
|
||
4 years ago
|
import SignatureRequest from './signature-request.component';
|
||
5 years ago
|
|
||
4 years ago
|
describe('Signature Request Component', () => {
|
||
|
describe('render', () => {
|
||
4 years ago
|
const fromAddress = '0x123456789abcdef';
|
||
4 years ago
|
it('should render a div with one child', () => {
|
||
4 years ago
|
const wrapper = shallowWithContext(
|
||
5 years ago
|
<SignatureRequest
|
||
4 years ago
|
clearConfirmTransaction={() => undefined}
|
||
|
cancel={() => undefined}
|
||
|
sign={() => undefined}
|
||
5 years ago
|
txData={{
|
||
|
msgParams: {
|
||
|
data: '{"message": {"from": {"name": "hello"}}}',
|
||
5 years ago
|
from: fromAddress,
|
||
5 years ago
|
},
|
||
|
}}
|
||
5 years ago
|
fromAccount={{ address: fromAddress }}
|
||
4 years ago
|
/>,
|
||
4 years ago
|
);
|
||
5 years ago
|
|
||
4 years ago
|
expect(wrapper.is('div')).toStrictEqual(true);
|
||
|
expect(wrapper).toHaveLength(1);
|
||
|
expect(wrapper.hasClass('signature-request')).toStrictEqual(true);
|
||
4 years ago
|
});
|
||
|
});
|
||
|
});
|