Sha256: 9268d13ba5ae16b5e123e2850fe0bca323bf86fac4d5e62494712bd394f30202

Contents?: true

Size: 368 Bytes

Versions: 2

Compression:

Stored size: 368 Bytes

Contents

require 'test_helper'

class Superstore::Types::IntegerTypeTest < Superstore::Types::TestCase
  test 'cast_value' do
    assert_nil type.cast_value('')
    assert_nil type.cast_value('abc')
    assert_equal 3, type.cast_value(3)
    assert_equal 3, type.cast_value('3')
    assert_equal(-3, type.cast_value('-3'))
    assert_equal 27, type.cast_value('027')
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
superstore-3.0.0 test/unit/types/integer_type_test.rb
superstore-2.5.0 test/unit/types/integer_type_test.rb