diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/migrations/20191125114345_add_admin_mode_protected_path_spec.rb | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/migrations/20191125114345_add_admin_mode_protected_path_spec.rb')
-rw-r--r-- | spec/migrations/20191125114345_add_admin_mode_protected_path_spec.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/migrations/20191125114345_add_admin_mode_protected_path_spec.rb b/spec/migrations/20191125114345_add_admin_mode_protected_path_spec.rb index 669e31618a3..77d8dd002e3 100644 --- a/spec/migrations/20191125114345_add_admin_mode_protected_path_spec.rb +++ b/spec/migrations/20191125114345_add_admin_mode_protected_path_spec.rb @@ -4,10 +4,9 @@ require 'spec_helper' require Rails.root.join('db', 'migrate', '20191125114345_add_admin_mode_protected_path.rb') describe AddAdminModeProtectedPath do - ADMIN_MODE_ENDPOINT = '/admin/session' - subject(:migration) { described_class.new } + let(:admin_mode_endpoint) { '/admin/session' } let(:application_settings) { table(:application_settings) } context 'no settings available' do @@ -30,7 +29,7 @@ describe AddAdminModeProtectedPath do application_settings.create!(protected_paths: '{a,b,c}') protected_paths_before = %w[a b c] - protected_paths_after = protected_paths_before.dup << ADMIN_MODE_ENDPOINT + protected_paths_after = protected_paths_before.dup << admin_mode_endpoint expect { migrate! }.to change { application_settings.first.protected_paths }.from(protected_paths_before).to(protected_paths_after) end @@ -38,13 +37,13 @@ describe AddAdminModeProtectedPath do it 'new default includes admin mode endpoint' do settings_before = application_settings.create! - expect(settings_before.protected_paths).not_to include(ADMIN_MODE_ENDPOINT) + expect(settings_before.protected_paths).not_to include(admin_mode_endpoint) migrate! application_settings.reset_column_information settings_after = application_settings.create! - expect(settings_after.protected_paths).to include(ADMIN_MODE_ENDPOINT) + expect(settings_after.protected_paths).to include(admin_mode_endpoint) end end |