diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-28 18:09:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-28 18:09:06 +0300 |
commit | c6ee7ef0f577e0155740d022babdc1b2b0e28d87 (patch) | |
tree | 8037a9487329eba19009520ba6c8e573beb1d63c /spec/rubocop/cop/migration | |
parent | 8c2b139cf778cd1d152f06bbc090a4313f975b81 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop/cop/migration')
-rw-r--r-- | spec/rubocop/cop/migration/add_limit_to_text_columns_spec.rb | 18 |
1 files changed, 18 insertions, 0 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 97b9d0d1ee2..149fb0a48eb 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 @@ -28,6 +28,15 @@ RSpec.describe RuboCop::Cop::Migration::AddLimitToTextColumns do ^^^^ #{described_class::MSG} end + create_table_with_constraints :test_text_limits_create do |t| + t.integer :test_id, null: false + t.text :title + t.text :description + ^^^^ #{described_class::MSG} + + t.text_limit :title, 100 + end + add_column :test_text_limits, :email, :text ^^^^^^^^^^ #{described_class::MSG} @@ -57,6 +66,15 @@ RSpec.describe RuboCop::Cop::Migration::AddLimitToTextColumns do t.text :name end + create_table_with_constraints :test_text_limits_create do |t| + t.integer :test_id, null: false + t.text :title + t.text :description + + t.text_limit :title, 100 + t.text_limit :description, 255 + end + add_column :test_text_limits, :email, :text add_column_with_default :test_text_limits, :role, :text, default: 'default' change_column_type_concurrently :test_text_limits, :test_id, :text |