diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-01-22 01:55:35 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-01-22 01:55:35 +0300 |
commit | baeaa97ef49558a303b0bd7b6cc9ce4ccfc13d1d (patch) | |
tree | c009601bc21af2f88f0d246427d5fbe3db5e5bb2 /spec/features | |
parent | f6f52b43b59641f5e0c6f7aa47b1354ca3aeee32 (diff) |
Revert "Merge branch 'dont-persist-application-settings-in-test-env' into 'master'"
This reverts merge request !8573
Diffstat (limited to 'spec/features')
5 files changed, 6 insertions, 23 deletions
diff --git a/spec/features/admin/admin_disables_git_access_protocol_spec.rb b/spec/features/admin/admin_disables_git_access_protocol_spec.rb index e8e080ce3e2..66044b44495 100644 --- a/spec/features/admin/admin_disables_git_access_protocol_spec.rb +++ b/spec/features/admin/admin_disables_git_access_protocol_spec.rb @@ -1,13 +1,10 @@ require 'rails_helper' feature 'Admin disables Git access protocol', feature: true do - include StubENV - let(:project) { create(:empty_project, :empty_repo) } let(:admin) { create(:admin) } background do - stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') login_as(admin) end diff --git a/spec/features/admin/admin_health_check_spec.rb b/spec/features/admin/admin_health_check_spec.rb index f7e49a56deb..dec2dedf2b5 100644 --- a/spec/features/admin/admin_health_check_spec.rb +++ b/spec/features/admin/admin_health_check_spec.rb @@ -1,11 +1,9 @@ require 'spec_helper' feature "Admin Health Check", feature: true do - include StubENV include WaitForAjax before do - stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') login_as :admin end @@ -14,12 +12,11 @@ feature "Admin Health Check", feature: true do visit admin_health_check_path end - it 'has a health check access token' do - page.has_text? 'Health Check' - page.has_text? 'Health information can be retrieved' + it { page.has_text? 'Health Check' } + it { page.has_text? 'Health information can be retrieved' } + it 'has a health check access token' do token = current_application_settings.health_check_access_token - expect(page).to have_content("Access token is #{token}") expect(page).to have_selector('#health-check-token', text: token) end diff --git a/spec/features/admin/admin_runners_spec.rb b/spec/features/admin/admin_runners_spec.rb index f05fbe3d062..d92c66b689d 100644 --- a/spec/features/admin/admin_runners_spec.rb +++ b/spec/features/admin/admin_runners_spec.rb @@ -1,10 +1,7 @@ require 'spec_helper' describe "Admin Runners" do - include StubENV - before do - stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') login_as :admin end diff --git a/spec/features/admin/admin_settings_spec.rb b/spec/features/admin/admin_settings_spec.rb index de42ab81fac..47fa2f14307 100644 --- a/spec/features/admin/admin_settings_spec.rb +++ b/spec/features/admin/admin_settings_spec.rb @@ -1,10 +1,7 @@ require 'spec_helper' feature 'Admin updates settings', feature: true do - include StubENV - - before do - stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') + before(:each) do login_as :admin visit admin_application_settings_path end diff --git a/spec/features/admin/admin_uses_repository_checks_spec.rb b/spec/features/admin/admin_uses_repository_checks_spec.rb index 855247de2ea..661fb761809 100644 --- a/spec/features/admin/admin_uses_repository_checks_spec.rb +++ b/spec/features/admin/admin_uses_repository_checks_spec.rb @@ -1,12 +1,7 @@ require 'rails_helper' feature 'Admin uses repository checks', feature: true do - include StubENV - - before do - stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') - login_as :admin - end + before { login_as :admin } scenario 'to trigger a single check' do project = create(:empty_project) @@ -34,7 +29,7 @@ feature 'Admin uses repository checks', feature: true do scenario 'to clear all repository checks', js: true do visit admin_application_settings_path - + expect(RepositoryCheck::ClearWorker).to receive(:perform_async) click_link 'Clear all repository checks' |