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:
Diffstat (limited to 'spec/migrations/change_default_value_for_dsa_key_restriction_spec.rb')
-rw-r--r--spec/migrations/change_default_value_for_dsa_key_restriction_spec.rb35
1 files changed, 0 insertions, 35 deletions
diff --git a/spec/migrations/change_default_value_for_dsa_key_restriction_spec.rb b/spec/migrations/change_default_value_for_dsa_key_restriction_spec.rb
deleted file mode 100644
index 448f1e2106e..00000000000
--- a/spec/migrations/change_default_value_for_dsa_key_restriction_spec.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require Rails.root.join('db', 'migrate', '20180531220618_change_default_value_for_dsa_key_restriction.rb')
-
-describe ChangeDefaultValueForDsaKeyRestriction do
- let(:application_settings) { table(:application_settings) }
-
- before do
- application_settings.create!
- end
-
- it 'changes the default value for dsa_key_restriction' do
- expect(application_settings.first.dsa_key_restriction).to eq(0)
-
- migrate!
-
- application_settings.reset_column_information
- new_setting = application_settings.create!
-
- expect(application_settings.count).to eq(2)
- expect(new_setting.dsa_key_restriction).to eq(-1)
- end
-
- it 'changes the existing setting' do
- setting = application_settings.last
-
- expect(setting.dsa_key_restriction).to eq(0)
-
- migrate!
-
- expect(application_settings.count).to eq(1)
- expect(setting.reload.dsa_key_restriction).to eq(-1)
- end
-end