diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-08-15 13:44:37 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-08-15 13:44:37 -0400 |
commit | 4edfad96784e8f77ec8ead26f01b4012977ba58a (patch) | |
tree | ca0ee5439beeaa96f7a7acd749c9e1c67a6dab6b /spec | |
parent | 05151f7699ee2adf67ce835413dfdbd80c58a3e5 (diff) | |
download | gitlab-ce-4edfad96784e8f77ec8ead26f01b4012977ba58a.tar.gz |
Enable Layout/TrailingWhitespace cop and auto-correct offenses
Diffstat (limited to 'spec')
20 files changed, 35 insertions, 35 deletions
diff --git a/spec/features/admin/admin_settings_spec.rb b/spec/features/admin/admin_settings_spec.rb index 5db42175c15..dbb0ae9c86e 100644 --- a/spec/features/admin/admin_settings_spec.rb +++ b/spec/features/admin/admin_settings_spec.rb @@ -74,7 +74,7 @@ feature 'Admin updates settings' do context 'sign-in restrictions', :js do it 'de-activates oauth sign-in source' do find('.btn', text: 'GitLab.com').click - + expect(find('.btn', text: 'GitLab.com')).not_to have_css('.active') end end diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index 3c8e37ff920..3ffc80622f5 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -708,7 +708,7 @@ describe 'Issues' do end describe 'confidential issue#show', js: true do - it 'shows confidential sibebar information as confidential and can be turned off' do + it 'shows confidential sibebar information as confidential and can be turned off' do issue = create(:issue, :confidential, project: project) visit project_issue_path(project, issue) diff --git a/spec/features/milestones/show_spec.rb b/spec/features/milestones/show_spec.rb index 20303359c46..624f13922ed 100644 --- a/spec/features/milestones/show_spec.rb +++ b/spec/features/milestones/show_spec.rb @@ -8,7 +8,7 @@ describe 'Milestone show' do let(:issue_params) { { project: project, assignees: [user], author: user, milestone: milestone, labels: labels } } before do - project.add_user(user, :developer) + project.add_user(user, :developer) sign_in(user) end diff --git a/spec/features/projects/files/undo_template_spec.rb b/spec/features/projects/files/undo_template_spec.rb index 4238d25e9ee..9bcd5beabb8 100644 --- a/spec/features/projects/files/undo_template_spec.rb +++ b/spec/features/projects/files/undo_template_spec.rb @@ -20,7 +20,7 @@ feature 'Template Undo Button', js: true do end end - context 'creating a non-matching file' do + context 'creating a non-matching file' do before do visit project_new_blob_path(project, 'master') select_file_template_type('LICENSE') diff --git a/spec/javascripts/fixtures/prometheus_service.rb b/spec/javascripts/fixtures/prometheus_service.rb index 7a46e47bb15..7968c9425f2 100644 --- a/spec/javascripts/fixtures/prometheus_service.rb +++ b/spec/javascripts/fixtures/prometheus_service.rb @@ -7,7 +7,7 @@ describe Projects::ServicesController, '(JavaScript fixtures)', type: :controlle let(:namespace) { create(:namespace, name: 'frontend-fixtures' )} let(:project) { create(:project_empty_repo, namespace: namespace, path: 'services-project') } let!(:service) { create(:prometheus_service, project: project) } - + render_views before(:all) do diff --git a/spec/javascripts/fixtures/services.rb b/spec/javascripts/fixtures/services.rb index 0a3c64d5d31..beecbb44792 100644 --- a/spec/javascripts/fixtures/services.rb +++ b/spec/javascripts/fixtures/services.rb @@ -7,7 +7,7 @@ describe Projects::ServicesController, '(JavaScript fixtures)', type: :controlle let(:namespace) { create(:namespace, name: 'frontend-fixtures' )} let(:project) { create(:project_empty_repo, namespace: namespace, path: 'services-project') } let!(:service) { create(:custom_issue_tracker_service, project: project, title: 'Custom Issue Tracker') } - + render_views diff --git a/spec/lib/gitlab/ci/trace/stream_spec.rb b/spec/lib/gitlab/ci/trace/stream_spec.rb index ebe5af56160..e5555546fa8 100644 --- a/spec/lib/gitlab/ci/trace/stream_spec.rb +++ b/spec/lib/gitlab/ci/trace/stream_spec.rb @@ -295,7 +295,7 @@ describe Gitlab::Ci::Trace::Stream do end context 'malicious regexp' do - let(:data) { malicious_text } + let(:data) { malicious_text } let(:regex) { malicious_regexp } include_examples 'malicious regexp' diff --git a/spec/lib/gitlab/cycle_analytics/base_event_fetcher_spec.rb b/spec/lib/gitlab/cycle_analytics/base_event_fetcher_spec.rb index 854aaa34c73..0560c47f03f 100644 --- a/spec/lib/gitlab/cycle_analytics/base_event_fetcher_spec.rb +++ b/spec/lib/gitlab/cycle_analytics/base_event_fetcher_spec.rb @@ -6,10 +6,10 @@ describe Gitlab::CycleAnalytics::BaseEventFetcher do let(:user) { create(:user, :admin) } let(:start_time_attrs) { Issue.arel_table[:created_at] } let(:end_time_attrs) { [Issue::Metrics.arel_table[:first_associated_with_milestone_at]] } - let(:options) do + let(:options) do { start_time_attrs: start_time_attrs, end_time_attrs: end_time_attrs, - from: 30.days.ago } + from: 30.days.ago } end subject do diff --git a/spec/lib/gitlab/key_fingerprint_spec.rb b/spec/lib/gitlab/key_fingerprint_spec.rb index f5fd5a96bc9..d643dc5342d 100644 --- a/spec/lib/gitlab/key_fingerprint_spec.rb +++ b/spec/lib/gitlab/key_fingerprint_spec.rb @@ -30,8 +30,8 @@ describe Gitlab::KeyFingerprint, lib: true do MD5_FINGERPRINTS = { rsa: '06:b2:8a:92:df:0e:11:2c:ca:7b:8f:a4:ba:6e:4b:fd', - ecdsa: '45:ff:5b:98:9a:b6:8a:41:13:c1:30:8b:09:5e:7b:4e', - ed25519: '2e:65:6a:c8:cf:bf:b2:8b:9a:bd:6d:9f:11:5c:12:16', + ecdsa: '45:ff:5b:98:9a:b6:8a:41:13:c1:30:8b:09:5e:7b:4e', + ed25519: '2e:65:6a:c8:cf:bf:b2:8b:9a:bd:6d:9f:11:5c:12:16', dss: '57:98:86:02:5f:9c:f4:9b:ad:5a:1e:51:92:0e:fd:2b' }.freeze diff --git a/spec/lib/gitlab/ldap/auth_hash_spec.rb b/spec/lib/gitlab/ldap/auth_hash_spec.rb index 57a91193004..8370adf9211 100644 --- a/spec/lib/gitlab/ldap/auth_hash_spec.rb +++ b/spec/lib/gitlab/ldap/auth_hash_spec.rb @@ -4,8 +4,8 @@ describe Gitlab::LDAP::AuthHash do let(:auth_hash) do described_class.new( OmniAuth::AuthHash.new( - uid: '123456', - provider: 'ldapmain', + uid: '123456', + provider: 'ldapmain', info: info, extra: { raw_info: raw_info @@ -33,11 +33,11 @@ describe Gitlab::LDAP::AuthHash do context "without overridden attributes" do it "has the correct username" do - expect(auth_hash.username).to eq("123456") + expect(auth_hash.username).to eq("123456") end it "has the correct name" do - expect(auth_hash.name).to eq("Smith, J.") + expect(auth_hash.name).to eq("Smith, J.") end end @@ -54,11 +54,11 @@ describe Gitlab::LDAP::AuthHash do end it "has the correct username" do - expect(auth_hash.username).to eq("johnsmith@example.com") + expect(auth_hash.username).to eq("johnsmith@example.com") end it "has the correct name" do - expect(auth_hash.name).to eq("John Smith") + expect(auth_hash.name).to eq("John Smith") end end end diff --git a/spec/lib/gitlab/o_auth/user_spec.rb b/spec/lib/gitlab/o_auth/user_spec.rb index 15edb820908..2cf0f7516de 100644 --- a/spec/lib/gitlab/o_auth/user_spec.rb +++ b/spec/lib/gitlab/o_auth/user_spec.rb @@ -481,7 +481,7 @@ describe Gitlab::OAuth::User do email: 'admin@othermail.com' } end - + it 'generates the username with a counter' do expect(gl_user.username).to eq('admin1') end diff --git a/spec/lib/gitlab/prometheus/additional_metrics_parser_spec.rb b/spec/lib/gitlab/prometheus/additional_metrics_parser_spec.rb index d7df4e35c31..5589db92b1d 100644 --- a/spec/lib/gitlab/prometheus/additional_metrics_parser_spec.rb +++ b/spec/lib/gitlab/prometheus/additional_metrics_parser_spec.rb @@ -24,7 +24,7 @@ describe Gitlab::Prometheus::AdditionalMetricsParser do queries: [{ query_range: 'query_range_empty' }] - group: group_b priority: 1 - metrics: + metrics: - title: title required_metrics: ['metric_a'] weight: 1 @@ -148,7 +148,7 @@ describe Gitlab::Prometheus::AdditionalMetricsParser do - group: group_a priority: 1 metrics: - - title: + - title: required_metrics: [] weight: 1 queries: [] diff --git a/spec/migrations/migrate_old_artifacts_spec.rb b/spec/migrations/migrate_old_artifacts_spec.rb index cfe1ca481b2..81366d15b34 100644 --- a/spec/migrations/migrate_old_artifacts_spec.rb +++ b/spec/migrations/migrate_old_artifacts_spec.rb @@ -10,7 +10,7 @@ describe MigrateOldArtifacts do before do allow(Gitlab.config.artifacts).to receive(:path).and_return(directory) end - + after do FileUtils.remove_entry_secure(directory) end @@ -95,7 +95,7 @@ describe MigrateOldArtifacts do FileUtils.copy( Rails.root.join('spec/fixtures/ci_build_artifacts.zip'), File.join(legacy_path(build), "ci_build_artifacts.zip")) - + FileUtils.copy( Rails.root.join('spec/fixtures/ci_build_artifacts_metadata.gz'), File.join(legacy_path(build), "ci_build_artifacts_metadata.gz")) diff --git a/spec/requests/api/protected_branches_spec.rb b/spec/requests/api/protected_branches_spec.rb index e4f9c47fb33..1aa8a95780e 100644 --- a/spec/requests/api/protected_branches_spec.rb +++ b/spec/requests/api/protected_branches_spec.rb @@ -96,7 +96,7 @@ describe API::ProtectedBranches do describe 'POST /projects/:id/protected_branches' do let(:branch_name) { 'new_branch' } - context 'when authenticated as a master' do + context 'when authenticated as a master' do before do project.add_master(user) end @@ -221,7 +221,7 @@ describe API::ProtectedBranches do context 'when branch has a wildcard in its name' do let(:protected_name) { 'feature*' } - + it "unprotects a wildcard branch" do delete api("/projects/#{project.id}/protected_branches/#{branch_name}", user) diff --git a/spec/requests/api/settings_spec.rb b/spec/requests/api/settings_spec.rb index 97275b80d03..737c028ad53 100644 --- a/spec/requests/api/settings_spec.rb +++ b/spec/requests/api/settings_spec.rb @@ -45,7 +45,7 @@ describe API::Settings, 'Settings' do help_page_hide_commercial_content: true, help_page_support_url: 'http://example.com/help', project_export_enabled: false - + expect(response).to have_http_status(200) expect(json_response['default_projects_limit']).to eq(3) expect(json_response['password_authentication_enabled']).to be_falsey diff --git a/spec/requests/ci/api/builds_spec.rb b/spec/requests/ci/api/builds_spec.rb index ebd67eb1e94..7ccba4ba3ec 100644 --- a/spec/requests/ci/api/builds_spec.rb +++ b/spec/requests/ci/api/builds_spec.rb @@ -130,7 +130,7 @@ describe Ci::API::Builds do register_builds info: { platform: :darwin } expect(response).to have_http_status(201) - + expect(json_response["options"]).to be_empty end end diff --git a/spec/services/web_hook_service_spec.rb b/spec/services/web_hook_service_spec.rb index 365cb6b8f09..0726e135b20 100644 --- a/spec/services/web_hook_service_spec.rb +++ b/spec/services/web_hook_service_spec.rb @@ -144,7 +144,7 @@ describe WebHookService do describe '#async_execute' do let(:system_hook) { create(:system_hook) } - + it 'enqueue WebHookWorker' do expect(Sidekiq::Client).to receive(:enqueue).with(WebHookWorker, project_hook.id, data, 'push_hooks') diff --git a/spec/support/generate-seed-repo-rb b/spec/support/generate-seed-repo-rb index c89389b90ca..ef3c8e7087f 100755 --- a/spec/support/generate-seed-repo-rb +++ b/spec/support/generate-seed-repo-rb @@ -1,16 +1,16 @@ #!/usr/bin/env ruby -# +# # # generate-seed-repo-rb -# +# # This script generates the seed_repo.rb file used by lib/gitlab/git # tests. The seed_repo.rb file needs to be updated anytime there is a # Git push to https://gitlab.com/gitlab-org/gitlab-git-test. -# +# # Usage: -# +# # ./spec/support/generate-seed-repo-rb > spec/support/seed_repo.rb -# -# +# +# require 'erb' require 'tempfile' diff --git a/spec/support/matchers/access_matchers_for_controller.rb b/spec/support/matchers/access_matchers_for_controller.rb index ff60bd0c0ae..bb6b7c63ee9 100644 --- a/spec/support/matchers/access_matchers_for_controller.rb +++ b/spec/support/matchers/access_matchers_for_controller.rb @@ -1,6 +1,6 @@ # AccessMatchersForController # -# For testing authorize_xxx in controller. +# For testing authorize_xxx in controller. module AccessMatchersForController extend RSpec::Matchers::DSL include Warden::Test::Helpers diff --git a/spec/tasks/gitlab/gitaly_rake_spec.rb b/spec/tasks/gitlab/gitaly_rake_spec.rb index b29d63c7d67..1e9b20435ec 100644 --- a/spec/tasks/gitlab/gitaly_rake_spec.rb +++ b/spec/tasks/gitlab/gitaly_rake_spec.rb @@ -89,7 +89,7 @@ describe 'gitlab:gitaly namespace rake task' do it 'calls make in the gitaly directory without BUNDLE_PATH' do expect(main_object).to receive(:run_command!).with(command_preamble + ['make']).and_return(true) - + run_rake_task('gitlab:gitaly:install', clone_path) end end |