test/devise_test.rb in devise-1.2.rc vs test/devise_test.rb in devise-1.2.rc2
- old
+ new
@@ -60,6 +60,16 @@
Devise::CONTROLLERS.delete(:kivi)
assert_nothing_raised(Exception) { Devise.add_module(:authenticatable_again, :model => 'devise/model/authenticatable') }
assert defined?(Devise::Models::AuthenticatableAgain)
end
+
+ test 'should complain when comparing empty or different sized passes' do
+ [nil, ""].each do |empty|
+ assert_not Devise.secure_compare(empty, "something")
+ assert_not Devise.secure_compare("something", empty)
+ assert_not Devise.secure_compare(empty, empty)
+ end
+ assert_not Devise.secure_compare("size_1", "size_four")
+ end
+
end