diff options
author | elijah <elijah@riseup.net> | 2014-12-04 15:16:25 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-12-04 15:16:25 -0800 |
commit | 7ca1a6feb2f881f2a99b624c266f0779d2402ff9 (patch) | |
tree | 43ee2d96ba1281fae3e098dffe55aa1bc0a0e409 /tests/helpers/srp_helper.rb | |
parent | 60bd76583d46fe1c9f39804c7fd892fa9c1745d0 (diff) |
tests - better errors, ensure tmp users are deleted, remove bad 'pass()' call that made tmp_user tests always succeed.
Diffstat (limited to 'tests/helpers/srp_helper.rb')
-rw-r--r-- | tests/helpers/srp_helper.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/helpers/srp_helper.rb b/tests/helpers/srp_helper.rb index 0aa1b1fb..5d30b459 100644 --- a/tests/helpers/srp_helper.rb +++ b/tests/helpers/srp_helper.rb @@ -6,6 +6,7 @@ require 'digest' require 'openssl' require 'securerandom' +require 'base64' module SRP @@ -135,7 +136,7 @@ d15dc7d7b46154d6b6ce8ef4ad69b15d4982559b297bcf1885c529f566660e5 class User include SRP::Util - attr_accessor :username, :password, :salt, :verifier, :id, :session_token, :ok + attr_accessor :username, :password, :salt, :verifier, :id, :session_token, :ok, :deleted def initialize @username = "test_user_" + SecureRandom.urlsafe_base64(10).downcase.gsub(/[_-]/, '') @@ -143,6 +144,7 @@ d15dc7d7b46154d6b6ce8ef4ad69b15d4982559b297bcf1885c529f566660e5 @salt = bigrand(4).hex @verifier = modpow(GENERATOR, private_key) @ok = false + @deleted = false end def private_key |