Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-21 21:15:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-21 21:15:17 +0300
commit248492cc573e85aea19d7493c3a15d459be016c5 (patch)
treec25388f4af2e9a87e06121318982001b964e7573 /spec/rubocop
parent97a128c1d1bf45bcc00d5fae037f840eff1ae4e0 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop')
-rw-r--r--spec/rubocop/cop/migration/add_limit_to_text_columns_spec.rb24
1 files changed, 0 insertions, 24 deletions
diff --git a/spec/rubocop/cop/migration/add_limit_to_text_columns_spec.rb b/spec/rubocop/cop/migration/add_limit_to_text_columns_spec.rb
index a6a072e2caf..032cc12ab94 100644
--- a/spec/rubocop/cop/migration/add_limit_to_text_columns_spec.rb
+++ b/spec/rubocop/cop/migration/add_limit_to_text_columns_spec.rb
@@ -78,30 +78,6 @@ RSpec.describe RuboCop::Cop::Migration::AddLimitToTextColumns do
end
RUBY
end
-
- context 'for migrations before 2021_09_10_00_00_00' do
- it 'when limit: attribute is used (which is not supported yet for this version): registers an offense' do
- allow(cop).to receive(:version).and_return(described_class::TEXT_LIMIT_ATTRIBUTE_ALLOWED_SINCE - 5)
-
- expect_offense(<<~RUBY)
- class TestTextLimits < ActiveRecord::Migration[6.0]
- def up
- create_table :test_text_limit_attribute do |t|
- t.integer :test_id, null: false
- t.text :name, limit: 100
- ^^^^ Text columns should always have a limit set (255 is suggested). Using limit: is not supported in this version. You can add a limit to a `text` column by using `add_text_limit` or `.text_limit` inside `create_table`
- end
-
- create_table_with_constraints :test_text_limit_attribute do |t|
- t.integer :test_id, null: false
- t.text :name, limit: 100
- ^^^^ Text columns should always have a limit set (255 is suggested). Using limit: is not supported in this version. You can add a limit to a `text` column by using `add_text_limit` or `.text_limit` inside `create_table`
- end
- end
- end
- RUBY
- end
- end
end
context 'when text array columns are defined without a limit' do