Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20230505115558_add_authors_and_description_to_nuget_metadatum_spec.rb « migrations « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 11e8ec394765d95b5ca7a9d80e5c5e6c16f3c7d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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