summaryrefslogtreecommitdiff
path: root/spec/migrations
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-10 15:07:47 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-10 15:07:47 +0000
commit8b1228b0d409d7751f01d9fb72ebfbbf62399486 (patch)
tree1b4126fe48d7666a90c0d7ee26230cf8379b6410 /spec/migrations
parent96b0c1245c93585a8b0fe23e22306d32ff4e4905 (diff)
downloadgitlab-ce-8b1228b0d409d7751f01d9fb72ebfbbf62399486.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/migrations')
-rw-r--r--spec/migrations/drop_project_ci_cd_settings_merge_trains_enabled_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/migrations/drop_project_ci_cd_settings_merge_trains_enabled_spec.rb b/spec/migrations/drop_project_ci_cd_settings_merge_trains_enabled_spec.rb
new file mode 100644
index 00000000000..1b0e6e140ca
--- /dev/null
+++ b/spec/migrations/drop_project_ci_cd_settings_merge_trains_enabled_spec.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+require Rails.root.join('db', 'post_migrate', '20191128162854_drop_project_ci_cd_settings_merge_trains_enabled.rb')
+
+describe DropProjectCiCdSettingsMergeTrainsEnabled, :migration do
+ let!(:project_ci_cd_setting) { table(:project_ci_cd_settings) }
+
+ it 'correctly migrates up and down' do
+ reversible_migration do |migration|
+ migration.before -> {
+ expect(project_ci_cd_setting.column_names).to include("merge_trains_enabled")
+ }
+
+ migration.after -> {
+ project_ci_cd_setting.reset_column_information
+ expect(project_ci_cd_setting.column_names).not_to include("merge_trains_enabled")
+ }
+ end
+ end
+end