diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-24 09:16:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-24 09:16:22 +0300 |
commit | 6178536e7ea6b3d690899090cbaab41abdb31d2b (patch) | |
tree | 8ef6b0659eac6e1fd0ef9392cc07e499c4f6a03b /spec/migrations/20220120094340_drop_position_from_security_findings_spec.rb | |
parent | ac1b601e581fc7f69784f2d771ba4382f6d5744e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/migrations/20220120094340_drop_position_from_security_findings_spec.rb')
-rw-r--r-- | spec/migrations/20220120094340_drop_position_from_security_findings_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/migrations/20220120094340_drop_position_from_security_findings_spec.rb b/spec/migrations/20220120094340_drop_position_from_security_findings_spec.rb new file mode 100644 index 00000000000..2ad9a8220c3 --- /dev/null +++ b/spec/migrations/20220120094340_drop_position_from_security_findings_spec.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +require 'spec_helper' +require_migration!('drop_position_from_security_findings') + +RSpec.describe DropPositionFromSecurityFindings do + let(:events) { table(:security_findings) } + + it 'correctly migrates up and down' do + reversible_migration do |migration| + migration.before -> { + expect(events.column_names).to include('position') + } + + migration.after -> { + events.reset_column_information + expect(events.column_names).not_to include('position') + } + end + end +end |