summaryrefslogtreecommitdiff
path: root/test/auth_test.rb
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2012-10-04 10:47:19 +0200
committerAzul <azul@riseup.net>2012-10-04 10:47:19 +0200
commit66c3ed01eb012cae84193b4864c7c48eb77c2a8c (patch)
treeb23d69a19f60cc46a1baa4328cb34c703bea4bbf /test/auth_test.rb
parentc73f7c1b4c1270d4d0ca47650a12893a6d13e796 (diff)
more cleanup - no more duplicate password and username in Client
A client has a set of pwd and login and tries to auth with this.
Diffstat (limited to 'test/auth_test.rb')
-rw-r--r--test/auth_test.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/auth_test.rb b/test/auth_test.rb
index 559403a..c1bffd0 100644
--- a/test/auth_test.rb
+++ b/test/auth_test.rb
@@ -32,15 +32,17 @@ class AuthTest < Test::Unit::TestCase
end
def test_successful_auth
- assert @client.authenticate(@server, @username, @password)
+ assert @client.authenticate(@server)
end
def test_a_wrong_password
- assert !@client.authenticate(@server, @username, "wrong password")
+ client = SRP::Client.new(@username, "wrong password", @client.salt)
+ assert !client.authenticate(@server)
end
def test_wrong_username
- assert !@client.authenticate(@server, "wrong username", @password)
+ client = SRP::Client.new("wrong username", @password, @client.salt)
+ assert !client.authenticate(@server)
end
end