File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,10 @@ describe('Test for Settings Component', function () {
43
43
var instance = TestUtils . renderIntoDocument ( < Settings /> ) ;
44
44
45
45
expect ( instance . state . participating ) . toBeFalsy ( ) ;
46
- expect ( instance . toggleParticipating ) . toBeDefined ( ) ;
46
+ expect ( instance . toggleSetting ) . toBeDefined ( ) ;
47
47
expect ( instance . appQuit ) . toBeDefined ( ) ;
48
48
49
- instance . toggleParticipating ( {
49
+ instance . toggleSetting ( 'participating' , {
50
50
target : {
51
51
checked : true
52
52
}
Original file line number Diff line number Diff line change @@ -8,8 +8,10 @@ var SettingsStore = require('../stores/settings');
8
8
9
9
var SettingsPage = React . createClass ( {
10
10
getInitialState : function ( ) {
11
+ var settings = SettingsStore . getSettings ( ) ;
11
12
return {
12
- participating : SettingsStore . getSettings ( ) . participating
13
+ participating : settings . participating ,
14
+ playSound : settings . playSound
13
15
} ;
14
16
} ,
15
17
@@ -36,8 +38,8 @@ var SettingsPage = React.createClass({
36
38
< div className = 'col-xs-8' > Play sound</ div >
37
39
< div className = 'col-xs-4' >
38
40
< Toggle
39
- defaultChecked = { this . state . participating }
40
- onChange = { this . toggleSetting . bind ( this , 'play-sound ' ) } />
41
+ defaultChecked = { this . state . playSound }
42
+ onChange = { this . toggleSetting . bind ( this , 'playSound ' ) } />
41
43
</ div >
42
44
</ div >
43
45
< div className = 'row' >
You can’t perform that action at this time.
0 commit comments