Skip to content

Commit

Permalink
Remove active_record_uniqueness_supports_array_columns method
Browse files Browse the repository at this point in the history
  • Loading branch information
vsppedro committed Mar 7, 2021
1 parent 1c243ed commit 81a8746
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
4 changes: 0 additions & 4 deletions spec/support/unit/helpers/active_record_versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ def active_record_version
Tests::Version.new(::ActiveRecord::VERSION::STRING)
end

def active_record_uniqueness_supports_array_columns?
active_record_version < 5
end

def active_record_supports_optional_for_associations?
active_record_version >= 5
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -852,48 +852,6 @@
end
end

if (
database_supports_array_columns? &&
active_record_uniqueness_supports_array_columns?
)
context 'when one of the scoped attributes is a array-of-string column' do
include_examples 'it supports scoped attributes of a certain type',
column_type: :string,
array: true
end

context 'when one of the scoped attributes is an array-of-integer column' do
include_examples 'it supports scoped attributes of a certain type',
column_type: :integer,
array: true
end

context 'when one of the scoped attributes is an array-of-date column' do
include_examples 'it supports scoped attributes of a certain type',
column_type: :date,
array: true
end

context 'when one of the scoped attributes is an array-of-datetime column (using DateTime)' do
include_examples 'it supports scoped attributes of a certain type',
column_type: :datetime,
array: true
end

context 'when one of the scoped attributes is an array-of-datetime column (using Time)' do
include_examples 'it supports scoped attributes of a certain type',
column_type: :datetime,
value_type: :time,
array: true
end

context 'when one of the scoped attributes is an array-of-text column' do
include_examples 'it supports scoped attributes of a certain type',
column_type: :text,
array: true
end
end

context 'when an existing record that is not the first has a nil value for the scoped attribute' do
# This fails intermittently
# it 'still works' do
Expand Down

0 comments on commit 81a8746

Please sign in to comment.