aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorkenta-s <knt01222@gmail.com>2017-01-31 20:41:14 +0900
committerkenta-s <knt01222@gmail.com>2017-01-31 20:41:14 +0900
commit02bb4c55fdf04ce64bdbf155c66991d80837fe73 (patch)
tree204429382e927d921ce5b825b28eebfcf6b9f72b /activesupport
parent505463c859927408665ce141426f098fea303a4e (diff)
downloadrails-02bb4c55fdf04ce64bdbf155c66991d80837fe73.tar.gz
rails-02bb4c55fdf04ce64bdbf155c66991d80837fe73.tar.bz2
rails-02bb4c55fdf04ce64bdbf155c66991d80837fe73.zip
Add test for `variable_size_secure_compare`
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/security_utils_test.rb7
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