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 () {
4343 var instance = TestUtils . renderIntoDocument ( < Settings /> ) ;
4444
4545 expect ( instance . state . participating ) . toBeFalsy ( ) ;
46- expect ( instance . toggleParticipating ) . toBeDefined ( ) ;
46+ expect ( instance . toggleSetting ) . toBeDefined ( ) ;
4747 expect ( instance . appQuit ) . toBeDefined ( ) ;
4848
49- instance . toggleParticipating ( {
49+ instance . toggleSetting ( 'participating' , {
5050 target : {
5151 checked : true
5252 }
Original file line number Diff line number Diff line change @@ -8,8 +8,10 @@ var SettingsStore = require('../stores/settings');
88
99var SettingsPage = React . createClass ( {
1010 getInitialState : function ( ) {
11+ var settings = SettingsStore . getSettings ( ) ;
1112 return {
12- participating : SettingsStore . getSettings ( ) . participating
13+ participating : settings . participating ,
14+ playSound : settings . playSound
1315 } ;
1416 } ,
1517
@@ -36,8 +38,8 @@ var SettingsPage = React.createClass({
3638 < div className = 'col-xs-8' > Play sound</ div >
3739 < div className = 'col-xs-4' >
3840 < 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 ' ) } />
4143 </ div >
4244 </ div >
4345 < div className = 'row' >
You can’t perform that action at this time.
0 commit comments