Enable the Layout/IndentHash cop
This commit is contained in:
parent
3363e21427
commit
0be657c0d7
21 changed files with 163 additions and 155 deletions
|
@ -105,7 +105,8 @@ Layout/IndentAssignment:
|
|||
Enabled: true
|
||||
|
||||
Layout/IndentHash:
|
||||
Enabled: false
|
||||
Enabled: true
|
||||
EnforcedStyle: consistent
|
||||
|
||||
Layout/IndentHeredoc:
|
||||
Enabled: false
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
BROWSER = Hashie::Mash.new ({
|
||||
value: nil
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
CLAMAV = Hashie::Mash.new ({
|
||||
mock?: true,
|
||||
response: true
|
||||
})
|
||||
})
|
||||
|
|
|
@ -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: {
|
||||
put :update, params: {
|
||||
gestionnaire: {
|
||||
reset_password_token: @token,
|
||||
password: "supersecret",
|
||||
password_confirmation: "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: {
|
||||
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: {
|
||||
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
|
||||
|
|
|
@ -12,7 +12,6 @@ describe EntrepriseDecorator do
|
|||
raison_sociale: raison_sociale,
|
||||
nom: nom,
|
||||
prenom: prenom
|
||||
|
||||
}
|
||||
end
|
||||
let(:entreprise) { create(:entreprise, entreprise_params) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue