diff options
Diffstat (limited to 'spec/controllers')
11 files changed, 24 insertions, 23 deletions
diff --git a/spec/controllers/concerns/product_analytics_tracking_spec.rb b/spec/controllers/concerns/product_analytics_tracking_spec.rb index 250cc3cf2cf..2e734d81ea0 100644 --- a/spec/controllers/concerns/product_analytics_tracking_spec.rb +++ b/spec/controllers/concerns/product_analytics_tracking_spec.rb @@ -18,7 +18,7 @@ RSpec.describe ProductAnalyticsTracking, :snowplow do skip_before_action :authenticate_user!, only: :show track_event(:index, :show, name: 'g_analytics_valuestream', destinations: [:redis_hll, :snowplow], - conditions: [:custom_condition_one?, :custom_condition_two?]) { |controller| controller.get_custom_id } + conditions: [:custom_condition_one?, :custom_condition_two?]) { |controller| controller.get_custom_id } def index render html: 'index' diff --git a/spec/controllers/concerns/redis_tracking_spec.rb b/spec/controllers/concerns/redis_tracking_spec.rb index 178684ae2d0..0ad8fa79e5e 100644 --- a/spec/controllers/concerns/redis_tracking_spec.rb +++ b/spec/controllers/concerns/redis_tracking_spec.rb @@ -11,7 +11,8 @@ RSpec.describe RedisTracking do include RedisTracking skip_before_action :authenticate_user!, only: :show - track_redis_hll_event(:index, :show, name: 'g_compliance_approval_rules', + track_redis_hll_event(:index, :show, + name: 'g_compliance_approval_rules', if: [:custom_condition_one?, :custom_condition_two?]) { |controller| controller.get_custom_id } def index diff --git a/spec/controllers/import/bitbucket_controller_spec.rb b/spec/controllers/import/bitbucket_controller_spec.rb index af220e2d515..e73e61b6ec5 100644 --- a/spec/controllers/import/bitbucket_controller_spec.rb +++ b/spec/controllers/import/bitbucket_controller_spec.rb @@ -49,10 +49,10 @@ RSpec.describe Import::BitbucketController do let(:expires_in) { 1.day } let(:access_token) do double(token: token, - secret: secret, - expires_at: expires_at, - expires_in: expires_in, - refresh_token: refresh_token) + secret: secret, + expires_at: expires_at, + expires_in: expires_in, + refresh_token: refresh_token) end before do diff --git a/spec/controllers/oauth/token_info_controller_spec.rb b/spec/controllers/oauth/token_info_controller_spec.rb index b66fff4d4e9..3cd952d4935 100644 --- a/spec/controllers/oauth/token_info_controller_spec.rb +++ b/spec/controllers/oauth/token_info_controller_spec.rb @@ -24,12 +24,12 @@ RSpec.describe Oauth::TokenInfoController do expect(response).to have_gitlab_http_status(:ok) expect(Gitlab::Json.parse(response.body)).to eq( - 'scope' => %w[api], - 'scopes' => %w[api], - 'created_at' => access_token.created_at.to_i, - 'expires_in' => access_token.expires_in, - 'application' => { 'uid' => application.uid }, - 'resource_owner_id' => access_token.resource_owner_id, + 'scope' => %w[api], + 'scopes' => %w[api], + 'created_at' => access_token.created_at.to_i, + 'expires_in' => access_token.expires_in, + 'application' => { 'uid' => application.uid }, + 'resource_owner_id' => access_token.resource_owner_id, 'expires_in_seconds' => access_token.expires_in ) end diff --git a/spec/controllers/omniauth_callbacks_controller_spec.rb b/spec/controllers/omniauth_callbacks_controller_spec.rb index 9ecef8b7450..df5da29495e 100644 --- a/spec/controllers/omniauth_callbacks_controller_spec.rb +++ b/spec/controllers/omniauth_callbacks_controller_spec.rb @@ -406,7 +406,7 @@ RSpec.describe OmniauthCallbacksController, type: :controller do before do stub_last_request_id(last_request_id) stub_omniauth_saml_config(enabled: true, auto_link_saml_user: true, allow_single_sign_on: ['saml'], - providers: [saml_config]) + providers: [saml_config]) mock_auth_hash_with_saml_xml('saml', +'my-uid', user.email, mock_saml_response) request.env['devise.mapping'] = Devise.mappings[:user] request.env['omniauth.auth'] = Rails.application.env_config['omniauth.auth'] diff --git a/spec/controllers/projects/artifacts_controller_spec.rb b/spec/controllers/projects/artifacts_controller_spec.rb index 958fcd4360c..263f488ddbf 100644 --- a/spec/controllers/projects/artifacts_controller_spec.rb +++ b/spec/controllers/projects/artifacts_controller_spec.rb @@ -488,7 +488,7 @@ RSpec.describe Projects::ArtifactsController do context 'with regular branch' do before do pipeline.update!(ref: 'master', - sha: project.commit('master').sha) + sha: project.commit('master').sha) get :latest_succeeded, params: params_from_ref('master') end @@ -499,7 +499,7 @@ RSpec.describe Projects::ArtifactsController do context 'with branch name containing slash' do before do pipeline.update!(ref: 'improve/awesome', - sha: project.commit('improve/awesome').sha) + sha: project.commit('improve/awesome').sha) get :latest_succeeded, params: params_from_ref('improve/awesome') end @@ -510,7 +510,7 @@ RSpec.describe Projects::ArtifactsController do context 'with branch name and path containing slashes' do before do pipeline.update!(ref: 'improve/awesome', - sha: project.commit('improve/awesome').sha) + sha: project.commit('improve/awesome').sha) get :latest_succeeded, params: params_from_ref('improve/awesome', job.name, 'file/README.md') end diff --git a/spec/controllers/projects/feature_flags_controller_spec.rb b/spec/controllers/projects/feature_flags_controller_spec.rb index d7850cc5f33..29ad51d590f 100644 --- a/spec/controllers/projects/feature_flags_controller_spec.rb +++ b/spec/controllers/projects/feature_flags_controller_spec.rb @@ -194,7 +194,7 @@ RSpec.describe Projects::FeatureFlagsController do other_project = create(:project) other_project.add_developer(user) other_feature_flag = create(:operations_feature_flag, project: other_project, - name: 'other_flag') + name: 'other_flag') params = { namespace_id: other_project.namespace, project_id: other_project, @@ -486,7 +486,7 @@ RSpec.describe Projects::FeatureFlagsController do context 'when creating a version 2 feature flag with a gitlabUserList strategy' do let!(:user_list) do create(:operations_feature_flag_user_list, project: project, - name: 'My List', user_xids: 'user1,user2') + name: 'My List', user_xids: 'user1,user2') end let(:params) do diff --git a/spec/controllers/projects/grafana_api_controller_spec.rb b/spec/controllers/projects/grafana_api_controller_spec.rb index baee9705127..2e25b0271ce 100644 --- a/spec/controllers/projects/grafana_api_controller_spec.rb +++ b/spec/controllers/projects/grafana_api_controller_spec.rb @@ -52,8 +52,8 @@ RSpec.describe Projects::GrafanaApiController do .with(project, '1', 'api/v1/query_range', { 'query' => params[:query], 'start' => params[:start_time], - 'end' => params[:end_time], - 'step' => params[:step] }) + 'end' => params[:end_time], + 'step' => params[:step] }) expect(response).to have_gitlab_http_status(:ok) expect(json_response).to eq({}) diff --git a/spec/controllers/projects/pipeline_schedules_controller_spec.rb b/spec/controllers/projects/pipeline_schedules_controller_spec.rb index 77acd5fe13c..fa90a0d9abc 100644 --- a/spec/controllers/projects/pipeline_schedules_controller_spec.rb +++ b/spec/controllers/projects/pipeline_schedules_controller_spec.rb @@ -360,7 +360,7 @@ RSpec.describe Projects::PipelineSchedulesController do id: pipeline_schedule, schedule: schedule }, - as: :html + as: :html end end diff --git a/spec/controllers/projects/registry/tags_controller_spec.rb b/spec/controllers/projects/registry/tags_controller_spec.rb index c03a280d2cd..7b786f4a8af 100644 --- a/spec/controllers/projects/registry/tags_controller_spec.rb +++ b/spec/controllers/projects/registry/tags_controller_spec.rb @@ -167,7 +167,7 @@ RSpec.describe Projects::Registry::TagsController do repository_id: repository, ids: names }, - format: :json + format: :json end end diff --git a/spec/controllers/projects/service_desk_controller_spec.rb b/spec/controllers/projects/service_desk_controller_spec.rb index 1c4d6665414..bc507a033dc 100644 --- a/spec/controllers/projects/service_desk_controller_spec.rb +++ b/spec/controllers/projects/service_desk_controller_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' RSpec.describe Projects::ServiceDeskController do let_it_be(:project) do create(:project, :private, :custom_repo, service_desk_enabled: true, - files: { '.gitlab/issue_templates/service_desk.md' => 'template' }) + files: { '.gitlab/issue_templates/service_desk.md' => 'template' }) end let_it_be(:user) { create(:user) } |