From 03b7ae383f9039ef9d3f482c8a085f8b1c2cfdb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Schr=C3=B6der?= Date: Tue, 19 May 2015 16:28:40 +0200 Subject: [PATCH] Updated rpcd version and fixed password page --- luciexpress/htdocs/js/rpc.js | 3 +-- .../htdocs/plugins/settings/tests/test-settings.js | 14 -------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/luciexpress/htdocs/js/rpc.js b/luciexpress/htdocs/js/rpc.js index e1004bbb1..4a2d57663 100644 --- a/luciexpress/htdocs/js/rpc.js +++ b/luciexpress/htdocs/js/rpc.js @@ -84,7 +84,6 @@ }).done(function(result){ if(!("username" in result.data)) { console.log("Session: Not authenticated!"); - RPC_SESSION_ID = RPC_DEFAULT_SESSION_ID; // reset sid to 000.. deferred.reject(); } else { self.$session = result; @@ -93,7 +92,7 @@ deferred.resolve(result); } }).fail(function err(result){ - RPC_SESSION_ID = RPC_DEFAULT_SESSION_ID; + self.sid = RPC_DEFAULT_SESSION_ID; deferred.reject(); }); return deferred.promise(); diff --git a/luciexpress/htdocs/plugins/settings/tests/test-settings.js b/luciexpress/htdocs/plugins/settings/tests/test-settings.js index f9bcf64a4..846c3fb46 100644 --- a/luciexpress/htdocs/plugins/settings/tests/test-settings.js +++ b/luciexpress/htdocs/plugins/settings/tests/test-settings.js @@ -15,20 +15,6 @@ describe("Settings", function(){ it("should have required rpc functions", function(){ expect($rpc.luci2.system.password_set).to.be.a(Function); }); - it("should be able to check for online upgrade", function(done){ - $rpc.luci2.system.upgrade_check({type: "online"}).done(function(){ - done(); - }).fail(function(){ - throw new Error("Could not check for online upgrade!"); - }); - }); - it("should be able to check for usb upgrade", function(done){ - $rpc.luci2.system.upgrade_check({type: "usb"}).done(function(){ - done(); - }).fail(function(){ - throw new Error("Could not check for online upgrade!"); - }); - }); it("should not be able to set password without providing current password", function(done){ console.log("Trying to set password for user "+PARAMS.username); $rpc.luci2.system.password_set({"user": PARAMS.username, "password": "abrakadabra"}).done(function(){