Enable the Layout/IndentHash cop
This commit is contained in:
parent
3363e21427
commit
0be657c0d7
21 changed files with 163 additions and 155 deletions
|
@ -36,14 +36,14 @@ describe Admin::PiecesJustificativesController, type: :controller do
|
|||
let(:description) { "relevé d'identité bancaire" }
|
||||
let(:update_params) do
|
||||
{
|
||||
types_de_piece_justificative_attributes:
|
||||
types_de_piece_justificative_attributes:
|
||||
{
|
||||
'0' =>
|
||||
{
|
||||
'0' =>
|
||||
{
|
||||
libelle: libelle,
|
||||
description: description
|
||||
}
|
||||
libelle: libelle,
|
||||
description: description
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -18,17 +18,17 @@ describe Admin::ProceduresController, type: :controller do
|
|||
|
||||
let(:procedure_params) {
|
||||
{
|
||||
libelle: libelle,
|
||||
description: description,
|
||||
organisation: organisation,
|
||||
direction: direction,
|
||||
lien_demarche: lien_demarche,
|
||||
cerfa_flag: cerfa_flag,
|
||||
module_api_carto_attributes: {
|
||||
use_api_carto: use_api_carto,
|
||||
quartiers_prioritaires: quartiers_prioritaires,
|
||||
cadastre: cadastre
|
||||
}
|
||||
libelle: libelle,
|
||||
description: description,
|
||||
organisation: organisation,
|
||||
direction: direction,
|
||||
lien_demarche: lien_demarche,
|
||||
cerfa_flag: cerfa_flag,
|
||||
module_api_carto_attributes: {
|
||||
use_api_carto: use_api_carto,
|
||||
quartiers_prioritaires: quartiers_prioritaires,
|
||||
cadastre: cadastre
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,18 +21,20 @@ describe Gestionnaires::PasswordsController, type: :controller do
|
|||
put :update, params: {gestionnaire: {
|
||||
reset_password_token: @token,
|
||||
password: "supersecret",
|
||||
password_confirmation: "supersecret",
|
||||
password_confirmation: "supersecret"
|
||||
}}
|
||||
expect(subject.current_gestionnaire).to eq(gestionnaire)
|
||||
expect(subject.current_user).to eq(user)
|
||||
end
|
||||
|
||||
it "also signs administrateur in" do
|
||||
put :update, params: {gestionnaire: {
|
||||
reset_password_token: @token,
|
||||
password: "supersecret",
|
||||
password_confirmation: "supersecret",
|
||||
}}
|
||||
put :update, params: {
|
||||
gestionnaire: {
|
||||
reset_password_token: @token,
|
||||
password: "supersecret",
|
||||
password_confirmation: "supersecret"
|
||||
}
|
||||
}
|
||||
expect(subject.current_administrateur).to eq(administrateur)
|
||||
expect(subject.current_user).to eq(user)
|
||||
end
|
||||
|
|
|
@ -70,12 +70,13 @@ describe StatsController, type: :controller do
|
|||
|
||||
subject { @controller.send(:cumulative_hash, association, :updated_at) }
|
||||
|
||||
it { expect(subject).to eq({
|
||||
it do
|
||||
expect(subject).to eq({
|
||||
2.month.ago.beginning_of_month => 2,
|
||||
1.month.ago.beginning_of_month => 4,
|
||||
1.hour.ago.beginning_of_month => 5
|
||||
})
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
context "while a super admin is not logged in" do
|
||||
|
@ -83,11 +84,12 @@ describe StatsController, type: :controller do
|
|||
|
||||
subject { @controller.send(:cumulative_hash, association, :updated_at) }
|
||||
|
||||
it { expect(subject).to eq({
|
||||
it do
|
||||
expect(subject).to eq({
|
||||
2.month.ago.beginning_of_month => 2,
|
||||
1.month.ago.beginning_of_month => 4
|
||||
})
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -18,21 +18,25 @@ describe Users::PasswordsController, type: :controller do
|
|||
end
|
||||
|
||||
it "also signs gestionnaire in" do
|
||||
put :update, params: {user: {
|
||||
reset_password_token: @token,
|
||||
password: "supersecret",
|
||||
password_confirmation: "supersecret",
|
||||
}}
|
||||
put :update, params: {
|
||||
user: {
|
||||
reset_password_token: @token,
|
||||
password: "supersecret",
|
||||
password_confirmation: "supersecret",
|
||||
}
|
||||
}
|
||||
expect(subject.current_user).to eq(user)
|
||||
expect(subject.current_gestionnaire).to eq(gestionnaire)
|
||||
end
|
||||
|
||||
it "also signs administrateur in" do
|
||||
put :update, params: {user: {
|
||||
reset_password_token: @token,
|
||||
password: "supersecret",
|
||||
password_confirmation: "supersecret",
|
||||
}}
|
||||
put :update, params: {
|
||||
user: {
|
||||
reset_password_token: @token,
|
||||
password: "supersecret",
|
||||
password_confirmation: "supersecret",
|
||||
}
|
||||
}
|
||||
expect(subject.current_user).to eq(user)
|
||||
expect(subject.current_administrateur).to eq(administrateur)
|
||||
end
|
||||
|
|
|
@ -7,12 +7,11 @@ describe EntrepriseDecorator do
|
|||
let(:prenom) { 'mon prenom' }
|
||||
let(:entreprise_params) do
|
||||
{
|
||||
capital_social: 123_000,
|
||||
code_effectif_entreprise: code_effectif,
|
||||
raison_sociale: raison_sociale,
|
||||
nom: nom,
|
||||
prenom: prenom
|
||||
|
||||
capital_social: 123_000,
|
||||
code_effectif_entreprise: code_effectif,
|
||||
raison_sociale: raison_sociale,
|
||||
nom: nom,
|
||||
prenom: prenom
|
||||
}
|
||||
end
|
||||
let(:entreprise) { create(:entreprise, entreprise_params) }
|
||||
|
|
|
@ -24,8 +24,8 @@ describe FileSizeValidator, lib: true do
|
|||
describe 'options uses a symbol' do
|
||||
let(:options) do
|
||||
{
|
||||
maximum: :test,
|
||||
attributes: { content: attachment }
|
||||
maximum: :test,
|
||||
attributes: { content: attachment }
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -48,10 +48,10 @@ describe TypesDeChampService do
|
|||
|
||||
it do
|
||||
is_expected.to match({
|
||||
'0' => { 'libelle' => 'a', 'order_place' => '0' },
|
||||
'1' => { 'libelle' => 'c', 'order_place' => '1' },
|
||||
'2' => { 'libelle' => 'b', 'order_place' => '2' }
|
||||
})
|
||||
'0' => { 'libelle' => 'a', 'order_place' => '0' },
|
||||
'1' => { 'libelle' => 'c', 'order_place' => '1' },
|
||||
'2' => { 'libelle' => 'b', 'order_place' => '2' }
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -66,10 +66,10 @@ describe TypesDeChampService do
|
|||
|
||||
it do
|
||||
is_expected.to match({
|
||||
'0' => { 'libelle' => 'b', 'order_place' => '0' },
|
||||
'1' => { 'libelle' => 'a', 'order_place' => '1' },
|
||||
'2' => { 'libelle' => 'c', 'order_place' => '2' }
|
||||
})
|
||||
'0' => { 'libelle' => 'b', 'order_place' => '0' },
|
||||
'1' => { 'libelle' => 'a', 'order_place' => '1' },
|
||||
'2' => { 'libelle' => 'c', 'order_place' => '2' }
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -85,11 +85,11 @@ describe TypesDeChampService do
|
|||
|
||||
it 'does not change the natural order' do
|
||||
is_expected.to match({
|
||||
'0' => { 'libelle' => 'a', 'order_place' => '0' },
|
||||
'1' => { 'libelle' => 'b', 'order_place' => '1' },
|
||||
'2' => { 'libelle' => 'c', 'order_place' => '2' },
|
||||
'3' => { 'libelle' => 'd', 'order_place' => '3' }
|
||||
})
|
||||
'0' => { 'libelle' => 'a', 'order_place' => '0' },
|
||||
'1' => { 'libelle' => 'b', 'order_place' => '1' },
|
||||
'2' => { 'libelle' => 'c', 'order_place' => '2' },
|
||||
'3' => { 'libelle' => 'd', 'order_place' => '3' }
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue