summaryrefslogtreecommitdiff
path: root/spec/django/login.js
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2012-08-13 11:45:51 +0200
committerAzul <azul@riseup.net>2012-08-13 11:45:51 +0200
commit79610eaf3c0628c8b84da3a4bbf8a6598e1a03cb (patch)
tree412cf8475bbb1dd19e42f12e1ba6393beefe0e12 /spec/django/login.js
parentda8f6025900740684bc81e9a7c22f6a83ed48d79 (diff)
seperated session from the srp flow - login tests pass, signup fail
Diffstat (limited to 'spec/django/login.js')
-rw-r--r--spec/django/login.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/django/login.js b/spec/django/login.js
index eea6062..d13f695 100644
--- a/spec/django/login.js
+++ b/spec/django/login.js
@@ -16,8 +16,10 @@ describe("Login", function() {
beforeEach(function() {
- this.srp = new SRP();
- A = this.srp.calculateAndSetA(a);
+ var srp = new SRP();
+ var session = new srp.Session();
+ this.srp = new SRP(null, session)
+ A = session.calculateAndSetA(a);
specHelper.setupFakeXHR.apply(this);
@@ -51,14 +53,14 @@ describe("Login", function() {
});
it("rejects B = 0", function(){
- this.srp.error_message = sinon.spy();
+ this.srp.error = sinon.spy();
this.srp.identify();
this.expectRequest('handshake/', 'I=user&A='+A);
this.respondJSON({s: salt, B: 0});
// aborting if B=0
expect(this.requests).toEqual([]);
- expect(this.srp.error_message).toHaveBeenCalled();
+ expect(this.srp.error).toHaveBeenCalled();
});
});