diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-01 15:10:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-01 15:10:15 +0300 |
commit | cf19a51fc5711144b26f7123c14f9b64a7597195 (patch) | |
tree | 09c151fd3655213e87b1c25beb842a99510122cb /spec/migrations | |
parent | 3b1df712c7a15c9b6abadd61e9c8894fdeb0442a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/migrations')
-rw-r--r-- | spec/migrations/20230505115558_add_authors_and_description_to_nuget_metadatum_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/migrations/20230505115558_add_authors_and_description_to_nuget_metadatum_spec.rb b/spec/migrations/20230505115558_add_authors_and_description_to_nuget_metadatum_spec.rb new file mode 100644 index 00000000000..11e8ec39476 --- /dev/null +++ b/spec/migrations/20230505115558_add_authors_and_description_to_nuget_metadatum_spec.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +require 'spec_helper' +require_migration! + +RSpec.describe AddAuthorsAndDescriptionToNugetMetadatum, feature_category: :package_registry do + let(:metadatum) { table(:packages_nuget_metadata) } + + it 'correctly migrates up and down' do + reversible_migration do |migration| + migration.before -> { + expect(metadatum.column_names).not_to include('authors') + expect(metadatum.column_names).not_to include('description') + } + + migration.after -> { + metadatum.reset_column_information + + expect(metadatum.column_names).to include('authors') + expect(metadatum.column_names).to include('description') + } + end + end +end |