Sha256: 025a3f3236c23d0522ac02d412e6db1c5550535c031ec486bf8eaba6526841a3

Contents?: true

Size: 322 Bytes

Versions: 6

Compression:

Stored size: 322 Bytes

Contents

require 'test_helper'

class IntegerTest < ActiveSupport::TestCase
  def test_round_bytes
    assert_equal "99.44 MB", (99.megabytes + 450.kilobytes).round_bytes
    assert_equal "12.04 KB", (12.kilobytes + 45).round_bytes
    assert_equal "999 bytes", 999.round_bytes
    assert_equal "0 bytes", nil.round_bytes
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
browsercms-3.4.2 test/unit/extensions/integer_test.rb
browsercms-3.4.2.rc1 test/unit/extensions/integer_test.rb
browsercms-3.4.1 test/unit/extensions/integer_test.rb
browsercms-3.4.0 test/unit/extensions/integer_test.rb
browsercms-3.4.0.rc2 test/unit/extensions/integer_test.rb
browsercms-3.4.0.rc1 test/unit/extensions/integer_test.rb