summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2012-08-21 17:14:06 +0200
committerAzul <azul@riseup.net>2012-08-21 17:14:29 +0200
commitd5e30a95e09bab18a55f9aad1572b6ae3e16e482 (patch)
treef2e6646a800788d8ea8ea8b531d075844d12360e /spec
parent79610eaf3c0628c8b84da3a4bbf8a6598e1a03cb (diff)
moved on with refactoring
* srp_register now is part of srp.js * moved server specific stuff into plainXHR (such as fetching the seed from the server) * fixed tests
Diffstat (limited to 'spec')
-rw-r--r--spec/DjangoSpecRunner.html1
-rw-r--r--spec/RestfulSpecRunner.html2
-rw-r--r--spec/django/signup.js13
3 files changed, 3 insertions, 13 deletions
diff --git a/spec/DjangoSpecRunner.html b/spec/DjangoSpecRunner.html
index 5d8c95a..93696f0 100644
--- a/spec/DjangoSpecRunner.html
+++ b/spec/DjangoSpecRunner.html
@@ -22,7 +22,6 @@
<script type="text/javascript" src="../lib/srp.js"></script>
<script type="text/javascript" src="../lib/plainXHR.js"></script>
<script type="text/javascript" src="../lib/srp_session.js"></script>
- <script type="text/javascript" src="../lib/srp_register.js"></script>
<!-- include spec files here... -->
<script type="text/javascript" src="specHelper.js"></script>
diff --git a/spec/RestfulSpecRunner.html b/spec/RestfulSpecRunner.html
index bc4715f..11858e8 100644
--- a/spec/RestfulSpecRunner.html
+++ b/spec/RestfulSpecRunner.html
@@ -21,7 +21,7 @@
<script type="text/javascript" src="../lib/jsbn2.js"></script>
<script type="text/javascript" src="../lib/srp.js"></script>
<script type="text/javascript" src="../lib/jqueryRest.js"></script>
- <script type="text/javascript" src="../lib/srp_register.js"></script>
+ <script type="text/javascript" src="../lib/srp_session.js"></script>
<!-- include spec files here... -->
<script type="text/javascript" src="specHelper.js"></script>
diff --git a/spec/django/signup.js b/spec/django/signup.js
index 08a9b64..383dd14 100644
--- a/spec/django/signup.js
+++ b/spec/django/signup.js
@@ -13,22 +13,13 @@ describe("Signup", function() {
expect(typeof this.srp.register).toBe('function');
});
- it("fetches a salt from /register/salt", function(){
- var callback = sinon.spy();
- this.srp.register_receive_salt = callback;
- this.srp.register();
- this.expectRequest('register/salt/', "I=user")
- this.respondXML("<salt>5d3055e0acd3ddcfc15</salt>");
- expect(callback.called).toBeTruthy();
- });
-
it("receives the salt from /register/salt", function(){
var callback = sinon.spy();
- this.srp.remote.register_send_verifier = callback;
+ this.srp.remote.sendVerifier = callback;
this.srp.register();
this.expectRequest('register/salt/', "I=user")
this.respondXML("<salt>5d3055e0acd3ddcfc15</salt>");
- expect(callback).toHaveBeenCalledWith(this.srp, this.srp.registered_user);
+ expect(callback).toHaveBeenCalledWith(this.srp.session, this.srp.registered_user);
});
it("identifies after successful registration (INTEGRATION)", function(){