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>2022-05-19 10:33:21 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-19 10:33:21 +0300
commit36a59d088eca61b834191dacea009677a96c052f (patch)
treee4f33972dab5d8ef79e3944a9f403035fceea43f /spec/views/admin/application_settings/general.html.haml_spec.rb
parenta1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff)
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/views/admin/application_settings/general.html.haml_spec.rb')
-rw-r--r--spec/views/admin/application_settings/general.html.haml_spec.rb22
1 files changed, 15 insertions, 7 deletions
diff --git a/spec/views/admin/application_settings/general.html.haml_spec.rb b/spec/views/admin/application_settings/general.html.haml_spec.rb
index 7d28175d134..503e41eabc9 100644
--- a/spec/views/admin/application_settings/general.html.haml_spec.rb
+++ b/spec/views/admin/application_settings/general.html.haml_spec.rb
@@ -6,13 +6,16 @@ RSpec.describe 'admin/application_settings/general.html.haml' do
let(:app_settings) { build(:application_setting) }
let(:user) { create(:admin) }
+ before do
+ assign(:application_setting, app_settings)
+ allow(view).to receive(:current_user).and_return(user)
+ end
+
describe 'sourcegraph integration' do
let(:sourcegraph_flag) { true }
before do
- assign(:application_setting, app_settings)
allow(Gitlab::Sourcegraph).to receive(:feature_available?).and_return(sourcegraph_flag)
- allow(view).to receive(:current_user).and_return(user)
end
context 'when sourcegraph feature is enabled' do
@@ -35,11 +38,6 @@ RSpec.describe 'admin/application_settings/general.html.haml' do
end
describe 'prompt user about registration features' do
- before do
- assign(:application_setting, app_settings)
- allow(view).to receive(:current_user).and_return(user)
- end
-
context 'when service ping is enabled' do
before do
stub_application_setting(usage_ping_enabled: true)
@@ -60,4 +58,14 @@ RSpec.describe 'admin/application_settings/general.html.haml' do
it_behaves_like 'renders registration features prompt', :application_setting_disabled_repository_size_limit
end
end
+
+ describe 'add license' do
+ before do
+ render
+ end
+
+ it 'does not show the Add License section' do
+ expect(rendered).not_to have_css('#js-add-license-toggle')
+ end
+ end
end