js: Connect to /mopidy/ws without trailing slash

This is the recommended URL since the switch to Tornado as web server.
This commit is contained in:
Stein Magnus Jodal 2014-06-15 23:18:12 +02:00
parent ee9d19fc6e
commit 13205bee5f
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ Mopidy.prototype._configure = function (settings) {
var currentHost = (typeof document !== "undefined" &&
document.location.host) || "localhost";
settings.webSocketUrl = settings.webSocketUrl ||
"ws://" + currentHost + "/mopidy/ws/";
"ws://" + currentHost + "/mopidy/ws";
if (settings.autoConnect !== false) {
settings.autoConnect = true;

View File

@ -48,7 +48,7 @@ buster.testCase("Mopidy", {
document.location.host || "localhost";
assert.calledOnceWith(this.webSocketConstructorStub,
"ws://" + currentHost + "/mopidy/ws/");
"ws://" + currentHost + "/mopidy/ws");
},
"does not connect when autoConnect is false": function () {
@ -84,7 +84,7 @@ buster.testCase("Mopidy", {
document.location.host || "localhost";
assert.calledOnceWith(this.webSocketConstructorStub,
"ws://" + currentHost + "/mopidy/ws/");
"ws://" + currentHost + "/mopidy/ws");
},
"does nothing when the WebSocket is open": function () {