diff options
author | Azul <azul@riseup.net> | 2012-10-11 17:02:15 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2012-10-11 17:02:15 +0200 |
commit | 04421b355eb93de2888f12801cc0ebe123414264 (patch) | |
tree | 6b0c5e7e75cc3ec002407b32d2408ec9d3ecad8d /test/session_test.rb | |
parent | bc36f65eb7f72fe3f4cf364e807f7d43eaa11edc (diff) |
authenticate returns the user, to_json includes M2. bumped version to 0.1.3release-0.1.0
This way the controller can easily use @user = @session.authenticate; respond_with @sessoin;
Diffstat (limited to 'test/session_test.rb')
-rw-r--r-- | test/session_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/session_test.rb b/test/session_test.rb index 9d1b92f..8327a63 100644 --- a/test/session_test.rb +++ b/test/session_test.rb @@ -1,4 +1,5 @@ require File.expand_path(File.dirname(__FILE__) + '/test_helper') +require 'json' class SessionTest < Test::Unit::TestCase @@ -21,7 +22,8 @@ class SessionTest < Test::Unit::TestCase session = SRP::Session.new(self, aa) session.send(:initialize_server, aa, b) # seeding b to compare to py_srp assert_equal bb.to_s(16), session.bb.to_s(16) - assert_equal m2, session.authenticate(m) + assert_equal self, session.authenticate(m) + assert_equal({'M2' => m2.to_s(16)}.to_json, session.to_json) end def test_zero_padded_salt |