diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-06 12:09:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-06 12:09:33 +0300 |
commit | 95de7177f2d5844e4aa399fea9a59d4ba6b4b1f1 (patch) | |
tree | b368e310fa60abd9841d2f25b116faedc6af90d2 /spec/rubocop | |
parent | c77b780ee080b978bd5a63f642f741e8892383dc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop')
-rw-r--r-- | spec/rubocop/cop/migration/schema_addition_methods_no_post_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/rubocop/cop/migration/schema_addition_methods_no_post_spec.rb b/spec/rubocop/cop/migration/schema_addition_methods_no_post_spec.rb index 94c0638cf1b..92e714d7a02 100644 --- a/spec/rubocop/cop/migration/schema_addition_methods_no_post_spec.rb +++ b/spec/rubocop/cop/migration/schema_addition_methods_no_post_spec.rb @@ -42,5 +42,13 @@ RSpec.describe RuboCop::Cop::Migration::SchemaAdditionMethodsNoPost, feature_cat end CODE end + + it "allows forbidden method to be called within nested statement" do + expect_no_offenses(<<~CODE) + def down + add_column(:table, :column, :boolean) unless column_exists?(:table, :column) + end + CODE + end end end |