Sha256: dcff3a16dac7786014e6692a37def5fd3c7d9ac99f080b85fb3062b4d7f82292
Contents?: true
Size: 920 Bytes
Versions: 1
Compression:
Stored size: 920 Bytes
Contents
require "test_helper" class CharacterLimitedColumnTest < TestCase def test_maximum_should_return_value_for_string_column original_column = ::ActiveRecord::ConnectionAdapters::Column.new("test_column", "", "varchar(255)") column = Valle::AbstractAdapter::CharacterLimitedColumn.new(original_column) assert column.maximum end def test_maximum_should_return_correct_value_for_string_column_if_user_redefine_limit original_column = ::ActiveRecord::ConnectionAdapters::Column.new("test_column", "", "varchar(200)") column = Valle::AbstractAdapter::CharacterLimitedColumn.new(original_column) assert_equal 200, column.maximum end def test_minimum_should_return_nil original_column = ::ActiveRecord::ConnectionAdapters::Column.new("test_column", "", "varchar") column = Valle::AbstractAdapter::CharacterLimitedColumn.new(original_column) assert_nil column.minimum end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
valle-1.0.1 | test/lib/abstract_adapter/character_limited_column_test.rb |