diff options
author | Azul <azul@riseup.net> | 2018-01-31 10:06:21 +0100 |
---|---|---|
committer | Azul <azul@riseup.net> | 2018-01-31 10:06:21 +0100 |
commit | 44f7e6f800dc1f6f2fc29e713bc49e1255856b2e (patch) | |
tree | 4916a01bd5ed705ad8690f7605fc379011d6f302 /app/assets/javascripts/srp/spec/account_spec.js | |
parent | 8370b62870a3100e126e6434a09eb518c26dfd71 (diff) |
git subrepo clone https://leap.se/git/srp_js app/assets/javascripts/srp
subrepo:
subdir: "app/assets/javascripts/srp"
merged: "2088cbe"
upstream:
origin: "https://leap.se/git/srp_js"
branch: "master"
commit: "2088cbe"
git-subrepo:
version: "0.3.1"
origin: "https://github.com/ingydotnet/git-subrepo"
commit: "a7ee886"
Diffstat (limited to 'app/assets/javascripts/srp/spec/account_spec.js')
-rw-r--r-- | app/assets/javascripts/srp/spec/account_spec.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/app/assets/javascripts/srp/spec/account_spec.js b/app/assets/javascripts/srp/spec/account_spec.js new file mode 100644 index 0000000..4110778 --- /dev/null +++ b/app/assets/javascripts/srp/spec/account_spec.js @@ -0,0 +1,31 @@ +describe("Account", function() { + describe("without seeded values", function(){ + beforeEach(function() { + account = new srp.Account(); + }); + + it("fetches the password from the password field", function(){ + expect(account.password()).toBe("password"); + }); + + it("fetches the login from the login field", function(){ + expect(account.login()).toBe("testuser"); + }); + + }); + + describe("with seeded values", function(){ + beforeEach(function() { + account = new srp.Account("login", "secret"); + }); + + it("uses the seeded password", function(){ + expect(account.password()).toBe("secret"); + }); + + it("uses the seeded login", function(){ + expect(account.login()).toBe("login"); + }); + + }); +}); |