From 635ea47f1c19d7985a8f5107c070ae19edf9dd54 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 20 Nov 2012 12:43:34 +0100 Subject: all request should go to absolute paths They should be independent of the url we're serving the page from --- spec/login_spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec/login_spec.js') 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([]); -- cgit v1.2.3