diff options
Diffstat (limited to 'spec/migrations/20230505115558_add_authors_and_description_to_nuget_metadatum_spec.rb')
-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 |