Enable some cops to remove ambiguity

This commit is contained in:
gregoirenovel 2018-03-06 12:09:57 +01:00
parent b5b73c8639
commit d3f0fc703a
3 changed files with 5 additions and 5 deletions

View file

@ -274,10 +274,10 @@ Lint/AmbiguousBlockAssociation:
Enabled: false Enabled: false
Lint/AmbiguousOperator: Lint/AmbiguousOperator:
Enabled: false Enabled: true
Lint/AmbiguousRegexpLiteral: Lint/AmbiguousRegexpLiteral:
Enabled: false Enabled: true
Lint/AssignmentInCondition: Lint/AssignmentInCondition:
Enabled: false Enabled: false

View file

@ -9,7 +9,7 @@ describe Admin::ProfileController, type: :controller do
describe 'POST #renew_api_token' do describe 'POST #renew_api_token' do
subject { post :renew_api_token } subject { post :renew_api_token }
it { expect{ subject }.to change{ administrateur.reload.api_token } } it { expect{ subject }.to change { administrateur.reload.api_token } }
it { subject; expect(response.status).to redirect_to(admin_profile_path) } it { subject; expect(response.status).to redirect_to(admin_profile_path) }
end end

View file

@ -333,9 +333,9 @@ describe API::V1::DossiersController do
it { expect(subject[:created_at]).not_to be_nil } it { expect(subject[:created_at]).not_to be_nil }
if Features.remote_storage if Features.remote_storage
it { expect(subject[:content_url]).to match /^https:\/\/storage.apientreprise.fr\/tps_dev\/cerfa-.*\.pdf$/ } it { expect(subject[:content_url]).to match(/^https:\/\/storage.apientreprise.fr\/tps_dev\/cerfa-.*\.pdf$/) }
else else
it { expect(subject[:content_url]).to match /^http:\/\/.*downloads.*_CERFA\.pdf$/ } it { expect(subject[:content_url]).to match(/^http:\/\/.*downloads.*_CERFA\.pdf$/) }
end end
describe 'user' do describe 'user' do