Enable the Layout/MultilineMethodCallIndentation cop

This commit is contained in:
gregoirenovel 2018-01-15 19:34:08 +01:00
parent b77837bfd1
commit 73dd58b6cd
21 changed files with 85 additions and 85 deletions

View file

@ -10,7 +10,7 @@ describe Carto::Bano::AddressRetriever do
before do
stub_request(:get, "http://api-adresse.data.gouv.fr/search?&q=#{request}&limit=5")
.to_return(status: status, body: response, headers: {})
.to_return(status: status, body: response, headers: {})
end
context 'when address return a list of address' do

View file

@ -6,9 +6,9 @@ describe CARTO::SGMAP::API do
before do
stub_request(:post, "https://apicarto.sgmap.fr/quartiers-prioritaires/search")
.with(:body => /.*/,
:headers => {'Content-Type' => 'application/json'})
.to_return(status: status, body: body)
.with(:body => /.*/,
:headers => {'Content-Type' => 'application/json'})
.to_return(status: status, body: body)
end
context 'when geojson is empty' do
let(:geojson) { '' }
@ -54,9 +54,9 @@ describe CARTO::SGMAP::API do
before do
stub_request(:post, "https://apicarto.sgmap.fr/cadastre/geometrie")
.with(:body => /.*/,
:headers => {'Content-Type' => 'application/json'})
.to_return(status: status, body: body)
.with(:body => /.*/,
:headers => {'Content-Type' => 'application/json'})
.to_return(status: status, body: body)
end
context 'when geojson is empty' do
let(:geojson) { '' }

View file

@ -5,9 +5,9 @@ describe CARTO::SGMAP::Cadastre::Adapter do
before do
stub_request(:post, "https://apicarto.sgmap.fr/cadastre/geometrie")
.with(:body => /.*/,
:headers => {'Content-Type' => 'application/json'})
.to_return(status: status, body: body)
.with(:body => /.*/,
:headers => {'Content-Type' => 'application/json'})
.to_return(status: status, body: body)
end
context 'coordinates are filled' do

View file

@ -5,9 +5,9 @@ describe CARTO::SGMAP::QuartiersPrioritaires::Adapter do
before do
stub_request(:post, "https://apicarto.sgmap.fr/quartiers-prioritaires/search")
.with(:body => /.*/,
:headers => {'Content-Type' => 'application/json'})
.to_return(status: status, body: body)
.with(:body => /.*/,
:headers => {'Content-Type' => 'application/json'})
.to_return(status: status, body: body)
end
context 'coordinates are filled' do

View file

@ -5,7 +5,7 @@ describe SIADE::API do
subject { described_class.entreprise(siren) }
before do
stub_request(:get, "https://staging.entreprise.api.gouv.fr/v2/entreprises/#{siren}?token=#{SIADETOKEN}")
.to_return(status: status, body: body)
.to_return(status: status, body: body)
end
context 'when siren does not exist' do
let(:siren) { '111111111' }
@ -31,7 +31,7 @@ describe SIADE::API do
subject { described_class.etablissement(siret) }
before do
stub_request(:get, "https://staging.entreprise.api.gouv.fr/v2/etablissements/#{siret}?token=#{SIADETOKEN}")
.to_return(status: status, body: body)
.to_return(status: status, body: body)
end
context 'when siret does not exist' do
@ -58,7 +58,7 @@ describe SIADE::API do
describe '.exercices' do
before do
stub_request(:get, /https:\/\/staging.entreprise.api.gouv.fr\/v2\/exercices\/.*token=/)
.to_return(status: status, body: body)
.to_return(status: status, body: body)
end
context 'when siret does not exist' do
@ -89,7 +89,7 @@ describe SIADE::API do
describe '.rna' do
before do
stub_request(:get, /https:\/\/staging.entreprise.api.gouv.fr\/v2\/associations\/.*token=/)
.to_return(status: status, body: body)
.to_return(status: status, body: body)
end
subject { described_class.rna(siren) }

View file

@ -5,7 +5,7 @@ describe SIADE::EntrepriseAdapter do
before do
stub_request(:get, "https://staging.entreprise.api.gouv.fr/v2/entreprises/418166096?token=#{SIADETOKEN}")
.to_return(body: File.read('spec/support/files/entreprise.json', status: 200))
.to_return(body: File.read('spec/support/files/entreprise.json', status: 200))
end
it '#to_params class est une Hash ?' do

View file

@ -7,7 +7,7 @@ describe SIADE::EtablissementAdapter do
before do
stub_request(:get, "https://staging.entreprise.api.gouv.fr/v2/etablissements/#{siret}?token=#{SIADETOKEN}")
.to_return(body: File.read('spec/support/files/etablissement.json', status: 200))
.to_return(body: File.read('spec/support/files/etablissement.json', status: 200))
end
it '#to_params class est une Hash ?' do
@ -74,7 +74,7 @@ describe SIADE::EtablissementAdapter do
before do
stub_request(:get, "https://staging.entreprise.api.gouv.fr/v2/etablissements/#{bad_siret}?token=#{SIADETOKEN}")
.to_return(body: 'Fake body', status: 404)
.to_return(body: 'Fake body', status: 404)
end
it { expect(subject).to be_nil }

View file

@ -6,7 +6,7 @@ describe SIADE::ExercicesAdapter do
before do
stub_request(:get, /https:\/\/staging.entreprise.api.gouv.fr\/v2\/exercices\/.*token=/)
.to_return(body: File.read('spec/support/files/exercices.json', status: 200))
.to_return(body: File.read('spec/support/files/exercices.json', status: 200))
end
it '#to_params class est une Hash ?' do

View file

@ -9,7 +9,7 @@ describe SIADE::RNAAdapter do
before do
stub_request(:get, /https:\/\/staging.entreprise.api.gouv.fr\/v2\/associations\/.*token=/)
.to_return(body: body, status: status)
.to_return(body: body, status: status)
end
context 'when siret is not valid' do