more fixtures
authorAzul <azul@riseup.net>
Sun, 14 Jul 2013 12:00:44 +0000 (14:00 +0200)
committerAzul <azul@riseup.net>
Sun, 14 Jul 2013 12:00:44 +0000 (14:00 +0200)
test/fixtures/failed_js_client.json [new file with mode: 0644]
test/session_test.rb
test/test_helper.rb

diff --git a/test/fixtures/failed_js_client.json b/test/fixtures/failed_js_client.json
new file mode 100644 (file)
index 0000000..374128a
--- /dev/null
@@ -0,0 +1,12 @@
+{
+  "username": "asre",
+  "salt": "ae631d2d5ed2c41d",
+  "verifier": "8abe157957f22cc3b0b004e964d8f4d036636b23c6489877db9a9f7e19f21b78df5b489171996dd4a57ab6714e31ed0f3187c930dd0b00654cab60aaf73d701cf71d3faed99da9cd37c0161c93f3e12c2627e286df9217bad7731d51c7558a7d07d9888808c5b62b275b07706cf2e3d0cdc628791c69975580f760c7bf28bae8",
+  "a": "eb9784d9",
+  "aa": "ab0109064a2da3c02c0cc6da028495d402affb814f4b40898c9c87922718bd03dbd41cf2fa0e23f4abd0f19722c3687b673177328ae4f74f48f7d8fafc30466652e97a2f8c438b471eb0ccbe66fb5bf0837ac7b2aa34bfc731714c3ce4fbb288abd59458e2e563391925a8b74b4179652839ea91da40a467702b1574728c9e22",
+  "bb": "ccc834b851d7d6e1aa86969705ecd53fd47c5e94c1e31f739db3534a73dee8eed362747d7b4c60ea9169352000dfe42ca8ae5d3b20bb8f40590106021e7a4cd398ca2df55cc209ad9732c8d6bd6c6acf8a27254dac3c74cbb326ee53a4519e6a630ccadebf1434f5e3d9bf99c7cd301255c94710445383808638394dd641aa27",
+  "s": "919418fb396e125dc8e881b01f3925029e8049e0f15032f601317a99489526fd46b8e8edb62962177b97efe2106a7da44b381e65a500ff1a86459683475b86b31fd81e73accc835a5e0da37b71ed68612c68fbe43a96b57bf3f5d560f71f37a3dbc7a2080c8a4dd7de1bb42cc6e1a21e66e3845f775cb4559ba9ac1faf551a39",
+  "k": "aa8c328244c426c6165be08a1fa8b07e2949c1df577466b4815109221e2da6b",
+  "m": "8438a6e4f31334588b826ee92b7669dd8db59856c5934a9c659e1481bcdcae86",
+  "m2": "ec1fd1de67a08b981016272222f54f4b1c42768cb46cd3675fe6573fd60eb186"
+}
index dc97077..ff3f4f3 100644 (file)
@@ -38,13 +38,6 @@ class SessionTest < Test::Unit::TestCase
     assert_equal client, session.authenticate(data[:m].hex)
   end
 
-  def fixture(filename)
-    path = File.expand_path("../fixtures/#{filename}.json", __FILE__)
-    HashWithIndifferentAccess[JSON.parse(File.read(path))]
-  end
-
-
-
   def stub_client(data)
     @username = data[:username]
     @password = data[:password]
index 23ff39a..3f85b7a 100644 (file)
@@ -2,3 +2,11 @@ require "rubygems"
 require 'test/unit'
 require 'activesupport' # for HashWithIndifferentAccess
 require File.expand_path(File.dirname(__FILE__) + '/../lib/ruby-srp.rb')
+
+class Test::Unit::TestCase
+  def fixture(filename)
+    path = File.expand_path("../fixtures/#{filename}.json", __FILE__)
+    HashWithIndifferentAccess[JSON.parse(File.read(path))]
+  end
+end
+