summaryrefslogtreecommitdiff
path: root/spec/calculate_spec.js
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2013-07-12 11:50:45 +0200
committerAzul <azul@riseup.net>2013-07-12 11:54:33 +0200
commit933567499fa4c46e42d45de6066064559cfded09 (patch)
treebf16d3d90448c396b8b34002163ea63152b875b2 /spec/calculate_spec.js
parent5c8a17447e382f9b9f9f241e293156a94162a1ca (diff)
also prefix our own toString(16) hex values
Diffstat (limited to 'spec/calculate_spec.js')
-rw-r--r--spec/calculate_spec.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/calculate_spec.js b/spec/calculate_spec.js
index f60c343..be916c1 100644
--- a/spec/calculate_spec.js
+++ b/spec/calculate_spec.js
@@ -22,6 +22,10 @@ describe("Calculate", function() {
expect(calculate.A(compare.a)).toBe(compare.aa);
});
+ it("prefixes A with 0 if needed", function() {
+ expect(calculate.A("3971782b")[0]).toBe("0");
+ });
+
it("calculates the right x", function() {
x = calculate.X("testuser","password","7686acb8")
expect(x).toBe('84d6bb567ddf584b1d8c8728289644d45dbfbb02deedd05c0f64db96740f0398');