diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2017-01-31 08:33:48 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-31 08:33:48 -0500 |
commit | 3488f08ce17ebec0374f6b87421e3ac2c739734f (patch) | |
tree | 7a2b903eb5a0edf6c41181c36c5d82b21339235f | |
parent | af05f272914b3c33ae69b76ffd67897e96c60c48 (diff) | |
parent | 02bb4c55fdf04ce64bdbf155c66991d80837fe73 (diff) | |
download | rails-3488f08ce17ebec0374f6b87421e3ac2c739734f.tar.gz rails-3488f08ce17ebec0374f6b87421e3ac2c739734f.tar.bz2 rails-3488f08ce17ebec0374f6b87421e3ac2c739734f.zip |
Merge pull request #27857 from kenta-s/add-test-for-variable_size_secure_compare
Add test for `variable_size_secure_compare`
-rw-r--r-- | activesupport/test/security_utils_test.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/test/security_utils_test.rb b/activesupport/test/security_utils_test.rb index 842bdd469d..e8f762da22 100644 --- a/activesupport/test/security_utils_test.rb +++ b/activesupport/test/security_utils_test.rb @@ -4,6 +4,11 @@ require "active_support/security_utils" 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 |