Sha256: 6ec96926aea700ee1f43eb91d8a071ac71e90828d919fe4ac3f9344001b86d59
Contents?: true
Size: 917 Bytes
Versions: 8
Compression:
Stored size: 917 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", "", "string(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", "", "string(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", "", "string") column = Valle::AbstractAdapter::CharacterLimitedColumn.new(original_column) assert_nil column.minimum end end
Version data entries
8 entries across 8 versions & 1 rubygems