Fix new Rubocop warnings

This commit is contained in:
Pierre de La Morinerie 2021-02-16 15:05:04 +01:00 committed by Pierre de La Morinerie (Rebase PR Action)
parent f41c1f9ff4
commit 98be7e2076
4 changed files with 16 additions and 9 deletions

View file

@ -914,9 +914,11 @@ describe ProcedurePresentation do
it 'should downcase and transform value' do
procedure_presentation.add_filter("suivis", "type_de_champ/#{first_type_de_champ_id}", "Oui")
expect(procedure_presentation.filters).to eq({ "suivis" => [
{ "label" => first_type_de_champ.libelle, "table" => "type_de_champ", "column" => first_type_de_champ_id, "value" => "true" }
]
expect(procedure_presentation.filters).to eq({
"suivis" =>
[
{ "label" => first_type_de_champ.libelle, "table" => "type_de_champ", "column" => first_type_de_champ_id, "value" => "true" }
]
})
end
end
@ -927,9 +929,10 @@ describe ProcedurePresentation do
it 'should passthrough value' do
procedure_presentation.add_filter("suivis", "type_de_champ/#{first_type_de_champ_id}", "Oui")
expect(procedure_presentation.filters).to eq({ "suivis" => [
{ "label" => first_type_de_champ.libelle, "table" => "type_de_champ", "column" => first_type_de_champ_id, "value" => "Oui" }
]
expect(procedure_presentation.filters).to eq({
"suivis" => [
{ "label" => first_type_de_champ.libelle, "table" => "type_de_champ", "column" => first_type_de_champ_id, "value" => "Oui" }
]
})
end
end

View file

@ -27,8 +27,8 @@ module FeatureHelpers
if sign_in_by_link
mail = ActionMailer::Base.deliveries.last
message = mail.html_part.body.raw_source
instructeur_id = message[/\".+\/connexion-par-jeton\/(.+)\?jeton=(.*)\"/, 1]
jeton = message[/\".+\/connexion-par-jeton\/(.+)\?jeton=(.*)\"/, 2]
instructeur_id = message[/".+\/connexion-par-jeton\/(.+)\?jeton=(.*)"/, 1]
jeton = message[/".+\/connexion-par-jeton\/(.+)\?jeton=(.*)"/, 2]
visit sign_in_by_link_path(instructeur_id, jeton: jeton)
end