+QUnit.module("Controls and access");
+QUnit.asyncTest("Setting actuator value", function () {
+ $.when(ut.controlcb).done(function () {
+ start();
+ var key;
+
+ query("control", {params : {action : "start", force : true},
+ username : $("#username").val(), password : $("#password").val(),
+ async : false,
+ callback : function(data) {
+ ok(data.status > 0, "Gaining access key");
+ ok(data.key, "Access key - " + data.key);
+ key = data.key;
+ }});
+ query("control", {params : {action : "set", id : 0,
+ username : $("#username").val(), password : $("#password").val(),
+ value : 200, key : key},
+ callback : function(data) {
+ ok(data.status > 0, "Setting actuator");
+ ok(true, data.description);
+ }});
+ });
+});