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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-11-08 00:10:15 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-11-08 00:10:15 +0300
commit4cf8d931aa8511aa93b8504e940d2f5ddfee7b4c (patch)
tree1c2cd88c4d895757f08b73708bf49b182cc0a715 /spec/migrations/20231019145202_add_status_to_packages_npm_metadata_caches_spec.rb
parentfbe6bd7c6aae0beb81fa47d5834393ed92662885 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/migrations/20231019145202_add_status_to_packages_npm_metadata_caches_spec.rb')
-rw-r--r--spec/migrations/20231019145202_add_status_to_packages_npm_metadata_caches_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/migrations/20231019145202_add_status_to_packages_npm_metadata_caches_spec.rb b/spec/migrations/20231019145202_add_status_to_packages_npm_metadata_caches_spec.rb
new file mode 100644
index 00000000000..eeeafbdc277
--- /dev/null
+++ b/spec/migrations/20231019145202_add_status_to_packages_npm_metadata_caches_spec.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+require_migration!
+
+RSpec.describe AddStatusToPackagesNpmMetadataCaches, feature_category: :package_registry do
+ let(:npm_metadata_caches) { table(:packages_npm_metadata_caches) }
+
+ it 'correctly migrates up and down' do
+ reversible_migration do |migration|
+ migration.before -> {
+ expect(npm_metadata_caches.column_names).not_to include('status')
+ }
+
+ migration.after -> {
+ npm_metadata_caches.reset_column_information
+
+ expect(npm_metadata_caches.column_names).to include('status')
+ }
+ end
+ end
+end