test/test_salty.rb in salty-0.0.6 vs test/test_salty.rb in salty-0.0.7
- old
+ new
@@ -1,28 +1,28 @@
require 'helper'
def random_string
- generate_salt
+ Salty.generate_salt
end
class TestSalty < Test::Unit::TestCase
context "test salt" do
should "hash equality" do
10.times do
str = random_string
- hashed = salty(str)
- assert salty_eq(str,hashed)
+ hashed = Salty.hash(str)
+ assert Salty.check(str,hashed)
end
end
should "hash inequaliy" do
10.times do
str = random_string
- hashed = salty(str)
+ hashed = Salty.hash(str)
other = random_string
- assert(other == str || (not salty_eq(other,hashed)))
+ assert(other == str || (not Salty.check(other,hashed)))
end
end
end
end