Skip to content

Commit

Permalink
test(wifi): toggle wifi-iface instead of wifi-device
Browse files Browse the repository at this point in the history
  • Loading branch information
HipsterBrown committed Jan 5, 2016
1 parent 22e4f80 commit f568e4b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/unit/wifi.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ module.exports['Tessel.setWifiState'] = {
},

setWifiStateTruthy: function(test) {
test.expect(7);
test.expect(8);
var state = true;

// Test is expecting several closes...;
Expand All @@ -402,6 +402,7 @@ module.exports['Tessel.setWifiState'] = {
.then(() => {
test.equal(this.simpleExec.calledThrice, true);
test.equal(this.turnOnWifi.callCount, 1);
test.deepEqual(this.turnOnWifi.lastCall.returnValue, ['uci', 'set', 'wireless.@wifi-iface[0].disabled=0']);
test.equal(this.commitWirelessCredentials.callCount, 1);
test.equal(this.reconnectWifi.callCount, 1);
test.equal(this.logsInfo.calledTwice, true);
Expand All @@ -415,7 +416,7 @@ module.exports['Tessel.setWifiState'] = {
});
},
setWifiStateFalsy: function(test) {
test.expect(7);
test.expect(8);
var state = false;

// Test is expecting several closes...;
Expand All @@ -441,6 +442,7 @@ module.exports['Tessel.setWifiState'] = {
.then(() => {
test.equal(this.simpleExec.calledThrice, true);
test.equal(this.turnOnWifi.callCount, 1);
test.deepEqual(this.turnOnWifi.lastCall.returnValue, ['uci', 'set', 'wireless.@wifi-iface[0].disabled=1']);
test.equal(this.commitWirelessCredentials.callCount, 1);
test.equal(this.reconnectWifi.callCount, 1);
test.equal(this.logsInfo.calledOnce, true);
Expand Down

0 comments on commit f568e4b

Please sign in to comment.