Permalink
Browse files

Merge pull request #27857 from kenta-s/add-test-for-variable_size_sec…

…ure_compare

Add test for `variable_size_secure_compare`
  • Loading branch information...
eileencodes committed Jan 31, 2017
2 parents af05f27 + 02bb4c5 commit 3488f08ce17ebec0374f6b87421e3ac2c739734f
Showing with 6 additions and 1 deletion.
  1. +6 −1 activesupport/test/security_utils_test.rb
@@ -4,6 +4,11 @@
class SecurityUtilsTest < ActiveSupport::TestCase
def test_secure_compare_should_perform_string_comparison
assert ActiveSupport::SecurityUtils.secure_compare("a", "a")
assert !ActiveSupport::SecurityUtils.secure_compare("a", "b")
assert_not ActiveSupport::SecurityUtils.secure_compare("a", "b")
end
def test_variable_size_secure_compare_should_perform_string_comparison
assert ActiveSupport::SecurityUtils.variable_size_secure_compare("a", "a")
assert_not ActiveSupport::SecurityUtils.variable_size_secure_compare("a", "b")
end
end

0 comments on commit 3488f08

Please sign in to comment.