diff options
author | Azul <azul@riseup.net> | 2012-11-20 12:43:34 +0100 |
---|---|---|
committer | Azul <azul@riseup.net> | 2012-11-20 12:43:34 +0100 |
commit | 635ea47f1c19d7985a8f5107c070ae19edf9dd54 (patch) | |
tree | 6332895341bf68c1f618feed8ee9f9a02ef4aaff /spec/login_spec.js | |
parent | 443a9d3aa5e66f98d7f701e04967620781f3012c (diff) |
all request should go to absolute paths
They should be independent of the url we're serving the page from
Diffstat (limited to 'spec/login_spec.js')
-rw-r--r-- | spec/login_spec.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/login_spec.js b/spec/login_spec.js index 16a63d0..e806cff 100644 --- a/spec/login_spec.js +++ b/spec/login_spec.js @@ -45,9 +45,9 @@ describe("Login with srp var", function() { srp.loggedIn = sinon.spy(); srp.login(); - this.expectRequest('sessions.json', 'login=' +login+ '&A=' +A, 'POST'); + this.expectRequest('/sessions.json', 'login=' +login+ '&A=' +A, 'POST'); this.respondJSON({salt: salt, B: B}); - this.expectRequest('sessions/'+login+'.json', 'client_auth='+M, 'PUT'); + this.expectRequest('/sessions/'+login+'.json', 'client_auth='+M, 'PUT'); this.respondJSON({M2: M2}); expect(srp.loggedIn).toHaveBeenCalled(); @@ -58,7 +58,7 @@ describe("Login with srp var", function() { var error = {login: "something went wrong on the server side"}; srp.login(); - this.expectRequest('sessions.json', 'login=' +login+ '&A=' +A, 'POST'); + this.expectRequest('/sessions.json', 'login=' +login+ '&A=' +A, 'POST'); this.respondJSON(error, 422); //this.expectNoMoreRequests(); @@ -72,7 +72,7 @@ describe("Login with srp var", function() { srp.error = sinon.spy(); srp.login(); - this.expectRequest('sessions.json', 'login=' +login+ '&A=' +A, 'POST'); + this.expectRequest('/sessions.json', 'login=' +login+ '&A=' +A, 'POST'); this.respondJSON({salt: salt, B: 0}); // aborting if B=0 expect(this.requests).toEqual([]); |