File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,25 @@ import sinon from 'sinon';
8
8
import Volume from '../../app/components/Volume.jsx' ;
9
9
10
10
describe ( '<Volume />' , ( ) => {
11
+ it ( 'renders the volume control with the default values' , ( ) => {
12
+ const value = 5 ;
13
+ const wrapper = shallow (
14
+ < Volume value = { value } onChange = { ( ) => { } } />
15
+ ) ;
16
+ const input = wrapper . find ( 'input' ) ;
17
+
18
+ assert . equal ( input . prop ( 'min' ) , 0 ) ;
19
+ assert . equal ( input . prop ( 'max' ) , 100 ) ;
20
+ assert . equal ( input . prop ( 'step' ) , 5 ) ;
21
+ } ) ;
22
+
11
23
it ( 'renders the volume control with the correct value' , ( ) => {
12
24
const value = 5 ;
13
25
const wrapper = shallow (
14
26
< Volume value = { value } onChange = { ( ) => { } } />
15
27
) ;
16
28
17
- assert . equal ( wrapper . props ( ) . value , 5 ) ;
29
+ assert . equal ( wrapper . find ( 'input' ) . prop ( ' value' ) , 5 ) ;
18
30
} ) ;
19
31
20
32
it ( 'calls the onChange function' , ( ) => {
You can’t perform that action at this time.
0 commit comments