diff options
Diffstat (limited to 'activesupport/test/core_ext/base64_ext_test.rb')
-rw-r--r-- | activesupport/test/core_ext/base64_ext_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/base64_ext_test.rb b/activesupport/test/core_ext/base64_ext_test.rb index 544c990b3c..07052a366a 100644 --- a/activesupport/test/core_ext/base64_ext_test.rb +++ b/activesupport/test/core_ext/base64_ext_test.rb @@ -7,4 +7,13 @@ class Base64Test < Test::Unit::TestCase assert_no_match(/\n/, ActiveSupport::Base64.encode64s("oneverylongstringthatwouldnormallybesplitupbynewlinesbytheregularbase64")) end end + + def test_encode_and_decode + ActiveSupport::Deprecation.silence do + string = "foobar" + encoded_string = ActiveSupport::Base64.encode64(string) + assert_equal "Zm9vYmFy\n", encoded_string + assert_equal string, ActiveSupport::Base64.decode64(encoded_string) + end + end end |