diff options
Diffstat (limited to 'spec/controllers')
15 files changed, 24 insertions, 24 deletions
diff --git a/spec/controllers/admin/application_settings_controller_spec.rb b/spec/controllers/admin/application_settings_controller_spec.rb index cb25011fd96..ab0cad989cb 100644 --- a/spec/controllers/admin/application_settings_controller_spec.rb +++ b/spec/controllers/admin/application_settings_controller_spec.rb @@ -9,7 +9,7 @@ RSpec.describe Admin::ApplicationSettingsController, :do_not_mock_admin_mode_set let(:group) { create(:group) } let(:project) { create(:project, namespace: group) } let(:admin) { create(:admin) } - let(:user) { create(:user)} + let(:user) { create(:user) } before do stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index 1e28ef4ba93..f1adb9020fa 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -1006,7 +1006,7 @@ RSpec.describe ApplicationController do end describe '.endpoint_id_for_action' do - controller(described_class) { } + controller(described_class) {} it 'returns an expected endpoint id' do expect(controller.class.endpoint_id_for_action('hello')).to eq('AnonymousController#hello') diff --git a/spec/controllers/groups/labels_controller_spec.rb b/spec/controllers/groups/labels_controller_spec.rb index 90da40cd5f0..37db26096d3 100644 --- a/spec/controllers/groups/labels_controller_spec.rb +++ b/spec/controllers/groups/labels_controller_spec.rb @@ -20,7 +20,7 @@ RSpec.describe Groups::LabelsController do it 'returns group and project labels by default' do get :index, params: { group_id: group }, format: :json - label_ids = json_response.map {|label| label['title']} + label_ids = json_response.map { |label| label['title'] } expect(label_ids).to match_array([label_1.title, group_label_1.title]) end @@ -36,7 +36,7 @@ RSpec.describe Groups::LabelsController do params = { group_id: subgroup, only_group_labels: true } get :index, params: params, format: :json - label_ids = json_response.map {|label| label['title']} + label_ids = json_response.map { |label| label['title'] } expect(label_ids).to match_array([group_label_1.title, subgroup_label_1.title]) end end diff --git a/spec/controllers/groups/releases_controller_spec.rb b/spec/controllers/groups/releases_controller_spec.rb index 9d372114d62..7dd0bc6206a 100644 --- a/spec/controllers/groups/releases_controller_spec.rb +++ b/spec/controllers/groups/releases_controller_spec.rb @@ -42,7 +42,7 @@ RSpec.describe Groups::ReleasesController do end it 'does not return any releases' do - expect(json_response.map {|r| r['tag'] } ).to be_empty + expect(json_response.map { |r| r['tag'] } ).to be_empty end it 'returns OK' do @@ -56,7 +56,7 @@ RSpec.describe Groups::ReleasesController do index - expect(json_response.map {|r| r['tag'] } ).to match_array(%w(p2 p1 v2 v1)) + expect(json_response.map { |r| r['tag'] } ).to match_array(%w(p2 p1 v2 v1)) end end diff --git a/spec/controllers/import/manifest_controller_spec.rb b/spec/controllers/import/manifest_controller_spec.rb index 0111ad9501f..6f805b44e89 100644 --- a/spec/controllers/import/manifest_controller_spec.rb +++ b/spec/controllers/import/manifest_controller_spec.rb @@ -6,7 +6,7 @@ RSpec.describe Import::ManifestController, :clean_gitlab_redis_shared_state do include ImportSpecHelper let_it_be(:user) { create(:user) } - let_it_be(:group) { create(:group)} + let_it_be(:group) { create(:group) } before(:all) do group.add_maintainer(user) diff --git a/spec/controllers/projects/blame_controller_spec.rb b/spec/controllers/projects/blame_controller_spec.rb index bf475f6135a..62a544bb3fc 100644 --- a/spec/controllers/projects/blame_controller_spec.rb +++ b/spec/controllers/projects/blame_controller_spec.rb @@ -41,7 +41,7 @@ RSpec.describe Projects::BlameController do end context "invalid branch, valid file" do - let(:id) { 'invalid-branch/files/ruby/missing_file.rb'} + let(:id) { 'invalid-branch/files/ruby/missing_file.rb' } it { is_expected.to respond_with(:not_found) } end diff --git a/spec/controllers/projects/deploy_keys_controller_spec.rb b/spec/controllers/projects/deploy_keys_controller_spec.rb index 821f7fca73d..308146ce792 100644 --- a/spec/controllers/projects/deploy_keys_controller_spec.rb +++ b/spec/controllers/projects/deploy_keys_controller_spec.rb @@ -27,8 +27,8 @@ RSpec.describe Projects::DeployKeysController do end context 'when json requested' do - let(:project2) { create(:project, :internal)} - let(:project_private) { create(:project, :private)} + let(:project2) { create(:project, :internal) } + let(:project_private) { create(:project, :private) } let(:deploy_key_internal) { create(:deploy_key) } let(:deploy_key_actual) { create(:deploy_key) } diff --git a/spec/controllers/projects/feature_flags_controller_spec.rb b/spec/controllers/projects/feature_flags_controller_spec.rb index fd95aa44568..d7850cc5f33 100644 --- a/spec/controllers/projects/feature_flags_controller_spec.rb +++ b/spec/controllers/projects/feature_flags_controller_spec.rb @@ -208,7 +208,7 @@ RSpec.describe Projects::FeatureFlagsController do end context 'when feature flag is not found' do - let!(:feature_flag) { } + let!(:feature_flag) {} let(:params) do { diff --git a/spec/controllers/projects/jobs_controller_spec.rb b/spec/controllers/projects/jobs_controller_spec.rb index e4e3151dd12..0793e790301 100644 --- a/spec/controllers/projects/jobs_controller_spec.rb +++ b/spec/controllers/projects/jobs_controller_spec.rb @@ -700,7 +700,7 @@ RSpec.describe Projects::JobsController, :clean_gitlab_redis_shared_state do expect(response).to match_response_schema('job/build_trace') expect(json_response['id']).to eq job.id expect(json_response['status']).to eq job.status - expect(json_response['lines'].flat_map {|l| l['content'].map { |c| c['text'] } }).to include("ヾ(´༎ຶД༎ຶ`)ノ") + expect(json_response['lines'].flat_map { |l| l['content'].map { |c| c['text'] } }).to include("ヾ(´༎ຶД༎ຶ`)ノ") end end diff --git a/spec/controllers/projects/labels_controller_spec.rb b/spec/controllers/projects/labels_controller_spec.rb index 776ed9774b1..a5259522fe2 100644 --- a/spec/controllers/projects/labels_controller_spec.rb +++ b/spec/controllers/projects/labels_controller_spec.rb @@ -25,10 +25,10 @@ RSpec.describe Projects::LabelsController do let_it_be(:group_label_3) { create(:group_label, group: group, title: 'Group Label 3') } let_it_be(:group_label_4) { create(:group_label, group: group, title: 'Group Label 4') } - let_it_be(:group_labels) { [group_label_3, group_label_4]} - let_it_be(:project_labels) { [label_4, label_5]} - let_it_be(:group_priority_labels) { [group_label_1, group_label_2]} - let_it_be(:project_priority_labels) { [label_1, label_2, label_3]} + let_it_be(:group_labels) { [group_label_3, group_label_4] } + let_it_be(:project_labels) { [label_4, label_5] } + let_it_be(:group_priority_labels) { [group_label_1, group_label_2] } + let_it_be(:project_priority_labels) { [label_1, label_2, label_3] } before do create(:label_priority, project: project, label: group_label_1, priority: 3) diff --git a/spec/controllers/projects/notes_controller_spec.rb b/spec/controllers/projects/notes_controller_spec.rb index 9050765afd6..1f8e96258ca 100644 --- a/spec/controllers/projects/notes_controller_spec.rb +++ b/spec/controllers/projects/notes_controller_spec.rb @@ -659,7 +659,7 @@ RSpec.describe Projects::NotesController do context 'when target_id and noteable_id do not match' do let(:locked_issue) { create(:issue, :locked, project: project) } - let(:issue) {create(:issue, project: project)} + let(:issue) { create(:issue, project: project) } it 'uses target_id and ignores noteable_id' do request_params = { diff --git a/spec/controllers/projects/releases_controller_spec.rb b/spec/controllers/projects/releases_controller_spec.rb index ad6682601f3..b307bb357fa 100644 --- a/spec/controllers/projects/releases_controller_spec.rb +++ b/spec/controllers/projects/releases_controller_spec.rb @@ -312,7 +312,7 @@ RSpec.describe Projects::ReleasesController do end context 'suffix path abuse' do - let(:suffix_path) { 'downloads/zips/../../../../../../../robots.txt'} + let(:suffix_path) { 'downloads/zips/../../../../../../../robots.txt' } it 'raises attack error' do expect do diff --git a/spec/controllers/projects/tree_controller_spec.rb b/spec/controllers/projects/tree_controller_spec.rb index 143516e4712..9bc3065b6da 100644 --- a/spec/controllers/projects/tree_controller_spec.rb +++ b/spec/controllers/projects/tree_controller_spec.rb @@ -163,8 +163,8 @@ RSpec.describe Projects::TreeController do end context 'successful creation' do - let(:path) { 'files/new_dir'} - let(:branch_name) { 'master-test'} + let(:path) { 'files/new_dir' } + let(:branch_name) { 'master-test' } it 'redirects to the new directory' do expect(subject) @@ -175,7 +175,7 @@ RSpec.describe Projects::TreeController do context 'unsuccessful creation' do let(:path) { 'README.md' } - let(:branch_name) { 'master'} + let(:branch_name) { 'master' } it 'does not allow overwriting of existing files' do expect(subject) diff --git a/spec/controllers/registrations/welcome_controller_spec.rb b/spec/controllers/registrations/welcome_controller_spec.rb index 8a5a8490a23..14e88d469ba 100644 --- a/spec/controllers/registrations/welcome_controller_spec.rb +++ b/spec/controllers/registrations/welcome_controller_spec.rb @@ -36,7 +36,7 @@ RSpec.describe Registrations::WelcomeController do sign_in(user) end - it { is_expected.to redirect_to(dashboard_projects_path)} + it { is_expected.to redirect_to(dashboard_projects_path) } end context 'when role is set and setup_for_company is not set' do @@ -78,7 +78,7 @@ RSpec.describe Registrations::WelcomeController do sign_in(user) end - it { is_expected.to redirect_to(dashboard_projects_path)} + it { is_expected.to redirect_to(dashboard_projects_path) } context 'when the new user already has any accepted group membership' do let!(:member1) { create(:group_member, user: user) } diff --git a/spec/controllers/snippets/notes_controller_spec.rb b/spec/controllers/snippets/notes_controller_spec.rb index 8e85e283b31..00d99b46d0b 100644 --- a/spec/controllers/snippets/notes_controller_spec.rb +++ b/spec/controllers/snippets/notes_controller_spec.rb @@ -312,7 +312,7 @@ RSpec.describe Snippets::NotesController do describe 'POST toggle_award_emoji' do let(:note) { create(:note_on_personal_snippet, noteable: public_snippet) } - let(:emoji_name) { 'thumbsup'} + let(:emoji_name) { 'thumbsup' } before do sign_in(user) |