aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/base64_ext_test.rb
blob: bd0e9f843d0454af1da505679cda84e3fbf675f7 (plain) (blame)
1
2
3
4
5
6
7
8
require 'abstract_unit'

class Base64Test < Test::Unit::TestCase
  def test_no_newline_in_encoded_value
    assert_match(/\n/,    ActiveSupport::Base64.encode64("oneverylongstringthatwouldnormallybesplitupbynewlinesbytheregularbase64"))
    assert_no_match(/\n/, ActiveSupport::Base64.encode64s("oneverylongstringthatwouldnormallybesplitupbynewlinesbytheregularbase64"))
  end
end