Upgrade to Rails 2.2.0
As a side benefit, fix an (non-user-visible) bug in display_s5(). Also fixed a bug where removing orphaned pages did not expire cached summary pages.
This commit is contained in:
parent
39348c65c2
commit
7600aef48b
827 changed files with 123652 additions and 11027 deletions
19
vendor/rails/activesupport/test/secure_random_test.rb
vendored
Normal file
19
vendor/rails/activesupport/test/secure_random_test.rb
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
require 'abstract_unit'
|
||||
|
||||
class SecureRandomTest < Test::Unit::TestCase
|
||||
def test_random_bytes
|
||||
b1 = ActiveSupport::SecureRandom.random_bytes(64)
|
||||
b2 = ActiveSupport::SecureRandom.random_bytes(64)
|
||||
assert_not_equal b1, b2
|
||||
end
|
||||
|
||||
def test_hex
|
||||
b1 = ActiveSupport::SecureRandom.hex(64)
|
||||
b2 = ActiveSupport::SecureRandom.hex(64)
|
||||
assert_not_equal b1, b2
|
||||
end
|
||||
|
||||
def test_random_number
|
||||
assert ActiveSupport::SecureRandom.random_number(5000) < 5000
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue