test/auth_test.rb in ruby-srp-0.1.4 vs test/auth_test.rb in ruby-srp-0.1.5
- old
+ new
@@ -27,24 +27,29 @@
class AuthTest < Test::Unit::TestCase
def setup
@username = 'user'
@password = 'opensesami'
- @client = SRP::Client.new(@username, @password)
+ @client = SRP::Client.new @username,
+ :password => @password
@server = Server.new(@client.salt, @client.verifier, @username)
end
def test_successful_auth
assert @client.authenticate(@server)
end
def test_a_wrong_password
- client = SRP::Client.new(@username, "wrong password", @client.salt)
+ client = SRP::Client.new @username,
+ :password => "wrong password",
+ :salt => @client.salt
assert !client.authenticate(@server)
end
def test_wrong_username
- client = SRP::Client.new("wrong username", @password, @client.salt)
+ client = SRP::Client.new "wrong username",
+ :password => @password,
+ :salt => @client.salt
assert !client.authenticate(@server)
end
end