diff options
Diffstat (limited to 'spec')
60 files changed, 281 insertions, 5 deletions
diff --git a/spec/config/smime_signature_settings_spec.rb b/spec/config/smime_signature_settings_spec.rb index 38f96e9b330..4f076a92b16 100644 --- a/spec/config/smime_signature_settings_spec.rb +++ b/spec/config/smime_signature_settings_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe SmimeSignatureSettings do diff --git a/spec/controllers/projects/git_http_controller_spec.rb b/spec/controllers/projects/git_http_controller_spec.rb index 88fa2236e33..b756dd5662d 100644 --- a/spec/controllers/projects/git_http_controller_spec.rb +++ b/spec/controllers/projects/git_http_controller_spec.rb @@ -22,5 +22,30 @@ describe Projects::GitHttpController do expect(response.status).to eq(401) end + + context 'with exceptions' do + let(:project) { create(:project, :public, :repository) } + + before do + allow(controller).to receive(:verify_workhorse_api!).and_return(true) + end + + it 'returns 503 with GRPC Unavailable' do + allow(controller).to receive(:access_check).and_raise(GRPC::Unavailable) + + get :info_refs, params: { service: 'git-upload-pack', namespace_id: project.namespace.to_param, project_id: project.path + '.git' } + + expect(response.status).to eq(503) + end + + it 'returns 503 with timeout error' do + allow(controller).to receive(:access_check).and_raise(Gitlab::GitAccess::TimeoutError) + + get :info_refs, params: { service: 'git-upload-pack', namespace_id: project.namespace.to_param, project_id: project.path + '.git' } + + expect(response.status).to eq(503) + expect(response.body).to eq 'Gitlab::GitAccess::TimeoutError' + end + end end end diff --git a/spec/helpers/diff_helper_spec.rb b/spec/helpers/diff_helper_spec.rb index 5396243f44d..47c076e3322 100644 --- a/spec/helpers/diff_helper_spec.rb +++ b/spec/helpers/diff_helper_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe DiffHelper do diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb index 60f0dd49ff3..93ad6008aec 100644 --- a/spec/models/namespace_spec.rb +++ b/spec/models/namespace_spec.rb @@ -954,4 +954,52 @@ describe Namespace do expect(group.has_parent?).to be_falsy end end + + describe '#closest_setting' do + using RSpec::Parameterized::TableSyntax + + shared_examples_for 'fetching closest setting' do + let!(:root_namespace) { create(:namespace) } + let!(:namespace) { create(:namespace, parent: root_namespace) } + + let(:setting) { namespace.closest_setting(setting_name) } + + before do + root_namespace.update_attribute(setting_name, root_setting) + namespace.update_attribute(setting_name, child_setting) + end + + it 'returns closest non-nil value' do + expect(setting).to eq(result) + end + end + + context 'when setting is of non-boolean type' do + where(:root_setting, :child_setting, :result) do + 100 | 200 | 200 + 100 | nil | 100 + nil | nil | nil + end + + with_them do + let(:setting_name) { :max_artifacts_size } + + it_behaves_like 'fetching closest setting' + end + end + + context 'when setting is of boolean type' do + where(:root_setting, :child_setting, :result) do + true | false | false + true | nil | true + nil | nil | nil + end + + with_them do + let(:setting_name) { :lfs_enabled } + + it_behaves_like 'fetching closest setting' + end + end + end end diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index c6d1a17c6cb..d9936a62191 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -5121,6 +5121,53 @@ describe Project do end end + describe '#closest_setting' do + using RSpec::Parameterized::TableSyntax + + shared_examples_for 'fetching closest setting' do + let!(:namespace) { create(:namespace) } + let!(:project) { create(:project, namespace: namespace) } + + let(:setting_name) { :some_setting } + let(:setting) { project.closest_setting(setting_name) } + + before do + allow(project).to receive(:read_attribute).with(setting_name).and_return(project_setting) + allow(namespace).to receive(:closest_setting).with(setting_name).and_return(group_setting) + allow(Gitlab::CurrentSettings).to receive(setting_name).and_return(global_setting) + end + + it 'returns closest non-nil value' do + expect(setting).to eq(result) + end + end + + context 'when setting is of non-boolean type' do + where(:global_setting, :group_setting, :project_setting, :result) do + 100 | 200 | 300 | 300 + 100 | 200 | nil | 200 + 100 | nil | nil | 100 + nil | nil | nil | nil + end + + with_them do + it_behaves_like 'fetching closest setting' + end + end + + context 'when setting is of boolean type' do + where(:global_setting, :group_setting, :project_setting, :result) do + true | true | false | false + true | false | nil | false + true | nil | nil | true + end + + with_them do + it_behaves_like 'fetching closest setting' + end + end + end + def rugged_config rugged_repo(project.repository).config end diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb index d9ef5edb848..bc3a04420f9 100644 --- a/spec/requests/api/runner_spec.rb +++ b/spec/requests/api/runner_spec.rb @@ -308,7 +308,9 @@ describe API::Runner, :clean_gitlab_redis_shared_state do end describe '/api/v4/jobs' do - let(:project) { create(:project, shared_runners_enabled: false) } + let(:root_namespace) { create(:namespace) } + let(:namespace) { create(:namespace, parent: root_namespace) } + let(:project) { create(:project, namespace: namespace, shared_runners_enabled: false) } let(:pipeline) { create(:ci_pipeline_without_jobs, project: project, ref: 'master') } let(:runner) { create(:ci_runner, :project, projects: [project]) } let(:job) do @@ -1412,12 +1414,54 @@ describe API::Runner, :clean_gitlab_redis_shared_state do end end - it 'fails to post too large artifact' do - stub_application_setting(max_artifacts_size: 0) + context 'when artifact is too large' do + let(:sample_max_size) { 100 } - authorize_artifacts_with_token_in_params(filesize: 100) + shared_examples_for 'rejecting too large artifacts' do + it 'fails to post' do + authorize_artifacts_with_token_in_params(filesize: sample_max_size.megabytes.to_i) - expect(response).to have_gitlab_http_status(413) + expect(response).to have_gitlab_http_status(413) + end + end + + context 'based on application setting' do + before do + stub_application_setting(max_artifacts_size: sample_max_size) + end + + it_behaves_like 'rejecting too large artifacts' + end + + context 'based on root namespace setting' do + before do + stub_application_setting(max_artifacts_size: 200) + root_namespace.update!(max_artifacts_size: sample_max_size) + end + + it_behaves_like 'rejecting too large artifacts' + end + + context 'based on child namespace setting' do + before do + stub_application_setting(max_artifacts_size: 200) + root_namespace.update!(max_artifacts_size: 200) + namespace.update!(max_artifacts_size: sample_max_size) + end + + it_behaves_like 'rejecting too large artifacts' + end + + context 'based on project setting' do + before do + stub_application_setting(max_artifacts_size: 200) + root_namespace.update!(max_artifacts_size: 200) + namespace.update!(max_artifacts_size: 200) + project.update!(max_artifacts_size: sample_max_size) + end + + it_behaves_like 'rejecting too large artifacts' + end end end diff --git a/spec/views/admin/dashboard/index.html.haml_spec.rb b/spec/views/admin/dashboard/index.html.haml_spec.rb index 0e8b7c82d3a..3aaaabe4629 100644 --- a/spec/views/admin/dashboard/index.html.haml_spec.rb +++ b/spec/views/admin/dashboard/index.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'admin/dashboard/index.html.haml' do diff --git a/spec/views/admin/sessions/new.html.haml_spec.rb b/spec/views/admin/sessions/new.html.haml_spec.rb index eb431a0b6de..57255748988 100644 --- a/spec/views/admin/sessions/new.html.haml_spec.rb +++ b/spec/views/admin/sessions/new.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'admin/sessions/new.html.haml' do diff --git a/spec/views/ci/status/_badge.html.haml_spec.rb b/spec/views/ci/status/_badge.html.haml_spec.rb index 49f57969239..59db828a0c7 100644 --- a/spec/views/ci/status/_badge.html.haml_spec.rb +++ b/spec/views/ci/status/_badge.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'ci/status/_badge' do diff --git a/spec/views/dashboard/projects/_blank_state_admin_welcome.haml_spec.rb b/spec/views/dashboard/projects/_blank_state_admin_welcome.haml_spec.rb index 2f58eec86dc..bc92278bb22 100644 --- a/spec/views/dashboard/projects/_blank_state_admin_welcome.haml_spec.rb +++ b/spec/views/dashboard/projects/_blank_state_admin_welcome.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'dashboard/projects/_blank_state_admin_welcome.html.haml' do diff --git a/spec/views/dashboard/projects/_nav.html.haml_spec.rb b/spec/views/dashboard/projects/_nav.html.haml_spec.rb index cbdd3c0acc3..61b6bfef120 100644 --- a/spec/views/dashboard/projects/_nav.html.haml_spec.rb +++ b/spec/views/dashboard/projects/_nav.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'dashboard/projects/_nav.html.haml' do diff --git a/spec/views/devise/shared/_signin_box.html.haml_spec.rb b/spec/views/devise/shared/_signin_box.html.haml_spec.rb index 0563984a03c..6d640686337 100644 --- a/spec/views/devise/shared/_signin_box.html.haml_spec.rb +++ b/spec/views/devise/shared/_signin_box.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'devise/shared/_signin_box' do diff --git a/spec/views/errors/access_denied.html.haml_spec.rb b/spec/views/errors/access_denied.html.haml_spec.rb index bde2f6f0169..b2e82847ab9 100644 --- a/spec/views/errors/access_denied.html.haml_spec.rb +++ b/spec/views/errors/access_denied.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'errors/access_denied' do diff --git a/spec/views/events/event/_push.html.haml_spec.rb b/spec/views/events/event/_push.html.haml_spec.rb index f5634de4916..e43e37188a3 100644 --- a/spec/views/events/event/_push.html.haml_spec.rb +++ b/spec/views/events/event/_push.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'events/event/_push.html.haml' do diff --git a/spec/views/groups/_home_panel.html.haml_spec.rb b/spec/views/groups/_home_panel.html.haml_spec.rb index 91c5ca261b9..8960dfa67db 100644 --- a/spec/views/groups/_home_panel.html.haml_spec.rb +++ b/spec/views/groups/_home_panel.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'groups/_home_panel' do diff --git a/spec/views/groups/edit.html.haml_spec.rb b/spec/views/groups/edit.html.haml_spec.rb index 0da3470433c..9fc850841ee 100644 --- a/spec/views/groups/edit.html.haml_spec.rb +++ b/spec/views/groups/edit.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'groups/edit.html.haml' do diff --git a/spec/views/help/instance_configuration.html.haml_spec.rb b/spec/views/help/instance_configuration.html.haml_spec.rb index 18628ddebf7..81d569b5cf4 100644 --- a/spec/views/help/instance_configuration.html.haml_spec.rb +++ b/spec/views/help/instance_configuration.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'help/instance_configuration' do diff --git a/spec/views/layouts/_head.html.haml_spec.rb b/spec/views/layouts/_head.html.haml_spec.rb index d7f24950e6f..bea0b0edf4d 100644 --- a/spec/views/layouts/_head.html.haml_spec.rb +++ b/spec/views/layouts/_head.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'layouts/_head' do diff --git a/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb index bf63021a7fa..9ec65dba586 100644 --- a/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'layouts/nav/sidebar/_admin' do diff --git a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb index b627b9dba59..7decfa58153 100644 --- a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'layouts/nav/sidebar/_project' do diff --git a/spec/views/notify/pipeline_failed_email.html.haml_spec.rb b/spec/views/notify/pipeline_failed_email.html.haml_spec.rb index 28f8203fd8f..b821b015c97 100644 --- a/spec/views/notify/pipeline_failed_email.html.haml_spec.rb +++ b/spec/views/notify/pipeline_failed_email.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'notify/pipeline_failed_email.html.haml' do diff --git a/spec/views/notify/pipeline_success_email.html.haml_spec.rb b/spec/views/notify/pipeline_success_email.html.haml_spec.rb index 79beca79724..fbf33b7ec35 100644 --- a/spec/views/notify/pipeline_success_email.html.haml_spec.rb +++ b/spec/views/notify/pipeline_success_email.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'notify/pipeline_success_email.html.haml' do diff --git a/spec/views/profiles/show.html.haml_spec.rb b/spec/views/profiles/show.html.haml_spec.rb index 9e7ac0b84fa..592b3a56ba3 100644 --- a/spec/views/profiles/show.html.haml_spec.rb +++ b/spec/views/profiles/show.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'profiles/show' do diff --git a/spec/views/projects/_home_panel.html.haml_spec.rb b/spec/views/projects/_home_panel.html.haml_spec.rb index 12925a5ab07..4d5b369e88e 100644 --- a/spec/views/projects/_home_panel.html.haml_spec.rb +++ b/spec/views/projects/_home_panel.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/_home_panel' do diff --git a/spec/views/projects/blob/_viewer.html.haml_spec.rb b/spec/views/projects/blob/_viewer.html.haml_spec.rb index 95f7f87d37b..a798a72fa76 100644 --- a/spec/views/projects/blob/_viewer.html.haml_spec.rb +++ b/spec/views/projects/blob/_viewer.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/blob/_viewer.html.haml' do diff --git a/spec/views/projects/buttons/_dropdown.html.haml_spec.rb b/spec/views/projects/buttons/_dropdown.html.haml_spec.rb index 8b9aab30286..2bc1de040d5 100644 --- a/spec/views/projects/buttons/_dropdown.html.haml_spec.rb +++ b/spec/views/projects/buttons/_dropdown.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/buttons/_dropdown' do diff --git a/spec/views/projects/ci/lints/show.html.haml_spec.rb b/spec/views/projects/ci/lints/show.html.haml_spec.rb index 2f0cd38c14a..ea67478ff98 100644 --- a/spec/views/projects/ci/lints/show.html.haml_spec.rb +++ b/spec/views/projects/ci/lints/show.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/ci/lints/show' do diff --git a/spec/views/projects/commit/_commit_box.html.haml_spec.rb b/spec/views/projects/commit/_commit_box.html.haml_spec.rb index 1086546c10d..07c530670d2 100644 --- a/spec/views/projects/commit/_commit_box.html.haml_spec.rb +++ b/spec/views/projects/commit/_commit_box.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/commit/_commit_box.html.haml' do diff --git a/spec/views/projects/commit/branches.html.haml_spec.rb b/spec/views/projects/commit/branches.html.haml_spec.rb index b9d4dc80fe0..36da489a84f 100644 --- a/spec/views/projects/commit/branches.html.haml_spec.rb +++ b/spec/views/projects/commit/branches.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/commit/branches.html.haml' do diff --git a/spec/views/projects/commit/show.html.haml_spec.rb b/spec/views/projects/commit/show.html.haml_spec.rb index d07099489e5..af28a8f9193 100644 --- a/spec/views/projects/commit/show.html.haml_spec.rb +++ b/spec/views/projects/commit/show.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/commit/show.html.haml' do diff --git a/spec/views/projects/commits/_commit.html.haml_spec.rb b/spec/views/projects/commits/_commit.html.haml_spec.rb index 6bf1b5fd2d0..669bb596de5 100644 --- a/spec/views/projects/commits/_commit.html.haml_spec.rb +++ b/spec/views/projects/commits/_commit.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/commits/_commit.html.haml' do diff --git a/spec/views/projects/diffs/_stats.html.haml_spec.rb b/spec/views/projects/diffs/_stats.html.haml_spec.rb index c7d2f85747c..eb853596f98 100644 --- a/spec/views/projects/diffs/_stats.html.haml_spec.rb +++ b/spec/views/projects/diffs/_stats.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/diffs/_stats.html.haml' do diff --git a/spec/views/projects/diffs/_viewer.html.haml_spec.rb b/spec/views/projects/diffs/_viewer.html.haml_spec.rb index 8ac32db5585..1d5d6e1e78d 100644 --- a/spec/views/projects/diffs/_viewer.html.haml_spec.rb +++ b/spec/views/projects/diffs/_viewer.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/diffs/_viewer.html.haml' do diff --git a/spec/views/projects/edit.html.haml_spec.rb b/spec/views/projects/edit.html.haml_spec.rb index 5c6b2e4b042..f576093ab45 100644 --- a/spec/views/projects/edit.html.haml_spec.rb +++ b/spec/views/projects/edit.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/edit' do diff --git a/spec/views/projects/environments/terminal.html.haml_spec.rb b/spec/views/projects/environments/terminal.html.haml_spec.rb index d2e47225226..b0b08a84f8d 100644 --- a/spec/views/projects/environments/terminal.html.haml_spec.rb +++ b/spec/views/projects/environments/terminal.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/environments/terminal' do diff --git a/spec/views/projects/imports/new.html.haml_spec.rb b/spec/views/projects/imports/new.html.haml_spec.rb index 11fe144d1d2..6cca369b9f6 100644 --- a/spec/views/projects/imports/new.html.haml_spec.rb +++ b/spec/views/projects/imports/new.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe "projects/imports/new.html.haml" do diff --git a/spec/views/projects/issues/_related_branches.html.haml_spec.rb b/spec/views/projects/issues/_related_branches.html.haml_spec.rb index 5cff7694029..a6817e3fdbf 100644 --- a/spec/views/projects/issues/_related_branches.html.haml_spec.rb +++ b/spec/views/projects/issues/_related_branches.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/issues/_related_branches' do diff --git a/spec/views/projects/jobs/_build.html.haml_spec.rb b/spec/views/projects/jobs/_build.html.haml_spec.rb index 1d58891036e..681df77ea99 100644 --- a/spec/views/projects/jobs/_build.html.haml_spec.rb +++ b/spec/views/projects/jobs/_build.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/ci/jobs/_build' do diff --git a/spec/views/projects/jobs/_generic_commit_status.html.haml_spec.rb b/spec/views/projects/jobs/_generic_commit_status.html.haml_spec.rb index dc2ffc9dc47..f193ce0a552 100644 --- a/spec/views/projects/jobs/_generic_commit_status.html.haml_spec.rb +++ b/spec/views/projects/jobs/_generic_commit_status.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/generic_commit_statuses/_generic_commit_status.html.haml' do diff --git a/spec/views/projects/jobs/show.html.haml_spec.rb b/spec/views/projects/jobs/show.html.haml_spec.rb index e06a9ecb98b..903a16d9e53 100644 --- a/spec/views/projects/jobs/show.html.haml_spec.rb +++ b/spec/views/projects/jobs/show.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/jobs/show' do diff --git a/spec/views/projects/merge_requests/_commits.html.haml_spec.rb b/spec/views/projects/merge_requests/_commits.html.haml_spec.rb index a7628548de6..71d74b06f85 100644 --- a/spec/views/projects/merge_requests/_commits.html.haml_spec.rb +++ b/spec/views/projects/merge_requests/_commits.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/merge_requests/_commits.html.haml' do diff --git a/spec/views/projects/merge_requests/creations/_new_submit.html.haml_spec.rb b/spec/views/projects/merge_requests/creations/_new_submit.html.haml_spec.rb index 88c4b52b3a6..f7db4a4d614 100644 --- a/spec/views/projects/merge_requests/creations/_new_submit.html.haml_spec.rb +++ b/spec/views/projects/merge_requests/creations/_new_submit.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/merge_requests/creations/_new_submit.html.haml' do diff --git a/spec/views/projects/merge_requests/diffs/_diffs.html.haml_spec.rb b/spec/views/projects/merge_requests/diffs/_diffs.html.haml_spec.rb index e7c40421f1f..a82ef3c04b5 100644 --- a/spec/views/projects/merge_requests/diffs/_diffs.html.haml_spec.rb +++ b/spec/views/projects/merge_requests/diffs/_diffs.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/merge_requests/diffs/_diffs.html.haml' do diff --git a/spec/views/projects/merge_requests/edit.html.haml_spec.rb b/spec/views/projects/merge_requests/edit.html.haml_spec.rb index 0a3a46210ed..74d9067076c 100644 --- a/spec/views/projects/merge_requests/edit.html.haml_spec.rb +++ b/spec/views/projects/merge_requests/edit.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/merge_requests/edit.html.haml' do diff --git a/spec/views/projects/merge_requests/show.html.haml_spec.rb b/spec/views/projects/merge_requests/show.html.haml_spec.rb index 23cb319a202..6023527cb28 100644 --- a/spec/views/projects/merge_requests/show.html.haml_spec.rb +++ b/spec/views/projects/merge_requests/show.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/merge_requests/show.html.haml' do diff --git a/spec/views/projects/notes/_more_actions_dropdown.html.haml_spec.rb b/spec/views/projects/notes/_more_actions_dropdown.html.haml_spec.rb index ae47f364296..a07523a4423 100644 --- a/spec/views/projects/notes/_more_actions_dropdown.html.haml_spec.rb +++ b/spec/views/projects/notes/_more_actions_dropdown.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/notes/_more_actions_dropdown' do diff --git a/spec/views/projects/pages_domains/show.html.haml_spec.rb b/spec/views/projects/pages_domains/show.html.haml_spec.rb index da27a04bfe9..ba0544a49b0 100644 --- a/spec/views/projects/pages_domains/show.html.haml_spec.rb +++ b/spec/views/projects/pages_domains/show.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/pages_domains/show' do diff --git a/spec/views/projects/pipeline_schedules/_pipeline_schedule.html.haml_spec.rb b/spec/views/projects/pipeline_schedules/_pipeline_schedule.html.haml_spec.rb index 5d60d6bc5e7..daf799ec13f 100644 --- a/spec/views/projects/pipeline_schedules/_pipeline_schedule.html.haml_spec.rb +++ b/spec/views/projects/pipeline_schedules/_pipeline_schedule.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/pipeline_schedules/_pipeline_schedule' do diff --git a/spec/views/projects/pipelines/_stage.html.haml_spec.rb b/spec/views/projects/pipelines/_stage.html.haml_spec.rb index e40e16e742b..591602859c3 100644 --- a/spec/views/projects/pipelines/_stage.html.haml_spec.rb +++ b/spec/views/projects/pipelines/_stage.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/pipelines/_stage' do diff --git a/spec/views/projects/services/_form.haml_spec.rb b/spec/views/projects/services/_form.haml_spec.rb index 06e159f103b..272ac97604a 100644 --- a/spec/views/projects/services/_form.haml_spec.rb +++ b/spec/views/projects/services/_form.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/services/_form' do diff --git a/spec/views/projects/settings/ci_cd/_autodevops_form.html.haml_spec.rb b/spec/views/projects/settings/ci_cd/_autodevops_form.html.haml_spec.rb index 697e44be065..94a85486cfa 100644 --- a/spec/views/projects/settings/ci_cd/_autodevops_form.html.haml_spec.rb +++ b/spec/views/projects/settings/ci_cd/_autodevops_form.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/settings/ci_cd/_autodevops_form' do diff --git a/spec/views/projects/tags/index.html.haml_spec.rb b/spec/views/projects/tags/index.html.haml_spec.rb index 7e372ae8d6d..66be085c290 100644 --- a/spec/views/projects/tags/index.html.haml_spec.rb +++ b/spec/views/projects/tags/index.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/tags/index' do diff --git a/spec/views/projects/tree/_tree_row.html.haml_spec.rb b/spec/views/projects/tree/_tree_row.html.haml_spec.rb index 3353b7665e2..ff2fe8aeb6c 100644 --- a/spec/views/projects/tree/_tree_row.html.haml_spec.rb +++ b/spec/views/projects/tree/_tree_row.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/tree/_tree_row' do diff --git a/spec/views/projects/tree/show.html.haml_spec.rb b/spec/views/projects/tree/show.html.haml_spec.rb index 5bb0173ab89..960cf42a793 100644 --- a/spec/views/projects/tree/show.html.haml_spec.rb +++ b/spec/views/projects/tree/show.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'projects/tree/show' do diff --git a/spec/views/shared/milestones/_issuable.html.haml_spec.rb b/spec/views/shared/milestones/_issuable.html.haml_spec.rb index 0a3f877cae0..3c2b7c6305a 100644 --- a/spec/views/shared/milestones/_issuable.html.haml_spec.rb +++ b/spec/views/shared/milestones/_issuable.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'shared/milestones/_issuable.html.haml' do diff --git a/spec/views/shared/milestones/_issuables.html.haml_spec.rb b/spec/views/shared/milestones/_issuables.html.haml_spec.rb index 24b55338db3..f77c14a687b 100644 --- a/spec/views/shared/milestones/_issuables.html.haml_spec.rb +++ b/spec/views/shared/milestones/_issuables.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'shared/milestones/_issuables.html.haml' do diff --git a/spec/views/shared/milestones/_top.html.haml_spec.rb b/spec/views/shared/milestones/_top.html.haml_spec.rb index f2ee8be5857..944dfc8a27b 100644 --- a/spec/views/shared/milestones/_top.html.haml_spec.rb +++ b/spec/views/shared/milestones/_top.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'shared/milestones/_top.html.haml' do diff --git a/spec/views/shared/notes/_form.html.haml_spec.rb b/spec/views/shared/notes/_form.html.haml_spec.rb index 0189f926a5f..d354c2f0100 100644 --- a/spec/views/shared/notes/_form.html.haml_spec.rb +++ b/spec/views/shared/notes/_form.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'shared/notes/_form' do diff --git a/spec/views/shared/projects/_project.html.haml_spec.rb b/spec/views/shared/projects/_project.html.haml_spec.rb index dc223861037..b123be42074 100644 --- a/spec/views/shared/projects/_project.html.haml_spec.rb +++ b/spec/views/shared/projects/_project.html.haml_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'shared/projects/_project.html.haml' do diff --git a/spec/workers/update_project_statistics_worker_spec.rb b/spec/workers/update_project_statistics_worker_spec.rb index a268fd2e4ba..191075f1a52 100644 --- a/spec/workers/update_project_statistics_worker_spec.rb +++ b/spec/workers/update_project_statistics_worker_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe UpdateProjectStatisticsWorker do |