summaryrefslogtreecommitdiff
path: root/users/test
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-02-07 20:12:00 +0100
committerAzul <azul@leap.se>2013-02-07 20:12:00 +0100
commit5df0631c6ee7f073c4e463d3c1d12bbaeb4fc39a (patch)
tree986a65ded26e48a002b783b1048bdff07ffd0917 /users/test
parent0362663decaa1c861b183ec3773f69952398a976 (diff)
parent40955e06c038ad3d84bfe88052c501fb7a6208d8 (diff)
Merge branch 'master' into feature/use-couchrest-session-store
Diffstat (limited to 'users/test')
-rw-r--r--users/test/integration/api/account_flow_test.rb6
-rw-r--r--users/test/unit/user_test.rb7
2 files changed, 3 insertions, 10 deletions
diff --git a/users/test/integration/api/account_flow_test.rb b/users/test/integration/api/account_flow_test.rb
index 4937814..314d71a 100644
--- a/users/test/integration/api/account_flow_test.rb
+++ b/users/test/integration/api/account_flow_test.rb
@@ -16,7 +16,7 @@ class AccountFlowTest < ActiveSupport::TestCase
@login = "integration_test_user"
User.find_by_login(@login).tap{|u| u.destroy if u}
@password = "srp, verify me!"
- @srp = SRP::Client.new(@login, @password)
+ @srp = SRP::Client.new @login, :password => @password
@user_params = {
:login => @login,
:password_verifier => @srp.verifier.to_s(16),
@@ -73,7 +73,7 @@ class AccountFlowTest < ActiveSupport::TestCase
end
test "signup and wrong password login attempt" do
- srp = SRP::Client.new(@login, "wrong password")
+ srp = SRP::Client.new @login, :password => "wrong password"
server_auth = srp.authenticate(self)
assert_json_error :password => "wrong password"
assert !last_response.successful?
@@ -81,7 +81,7 @@ class AccountFlowTest < ActiveSupport::TestCase
end
test "signup and wrong username login attempt" do
- srp = SRP::Client.new("wrong_login", @password)
+ srp = SRP::Client.new "wrong_login", :password => @password
server_auth = nil
assert_raises RECORD_NOT_FOUND do
server_auth = srp.authenticate(self)
diff --git a/users/test/unit/user_test.rb b/users/test/unit/user_test.rb
index 66563a3..10c8b46 100644
--- a/users/test/unit/user_test.rb
+++ b/users/test/unit/user_test.rb
@@ -40,13 +40,6 @@ class UserTest < ActiveSupport::TestCase
assert_equal @user.password_salt.hex, @user.salt
end
- test "should include SRP" do
- client_rnd = bigrand(32).hex
- srp_session = @user.initialize_auth(client_rnd)
- assert srp_session.is_a? SRP::Session
- assert_equal client_rnd, srp_session.aa
- end
-
test 'normal user is no admin' do
assert !@user.is_admin?
end