Use string interpolation
This commit is contained in:
parent
c9a79b4f08
commit
25aef60354
5 changed files with 14 additions and 14 deletions
|
@ -14,7 +14,7 @@ class Commentaire < ActiveRecord::Base
|
||||||
after_create :notify
|
after_create :notify
|
||||||
|
|
||||||
def header
|
def header
|
||||||
"#{email}, " + I18n.l(created_at.localtime, format: '%d %b %Y %H:%M')
|
"#{email}, #{I18n.l(created_at.localtime, format: '%d %b %Y %H:%M')}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def file_url
|
def file_url
|
||||||
|
|
|
@ -23,11 +23,11 @@ class RenderPartialService
|
||||||
private
|
private
|
||||||
|
|
||||||
def retrieve_navbar
|
def retrieve_navbar
|
||||||
'layouts/navbars/navbar_' + retrieve_name
|
"layouts/navbars/navbar_#{retrieve_name}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def retrieve_left_panel
|
def retrieve_left_panel
|
||||||
'layouts/left_panels/left_panel_' + retrieve_name
|
"layouts/left_panels/left_panel_#{retrieve_name}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def retrieve_name
|
def retrieve_name
|
||||||
|
|
|
@ -302,8 +302,8 @@ shared_examples 'description_controller_spec' do
|
||||||
before do
|
before do
|
||||||
post :update, params: {
|
post :update, params: {
|
||||||
dossier_id: dossier_id,
|
dossier_id: dossier_id,
|
||||||
'piece_justificative_' + all_pj_type[0].to_s => piece_justificative_0,
|
"piece_justificative_#{all_pj_type[0].to_s}" => piece_justificative_0,
|
||||||
'piece_justificative_' + all_pj_type[1].to_s => piece_justificative_1
|
"piece_justificative_#{all_pj_type[1].to_s}" => piece_justificative_1
|
||||||
}
|
}
|
||||||
dossier.reload
|
dossier.reload
|
||||||
end
|
end
|
||||||
|
@ -314,8 +314,8 @@ shared_examples 'description_controller_spec' do
|
||||||
|
|
||||||
post :update, params: {
|
post :update, params: {
|
||||||
dossier_id: dossier_id,
|
dossier_id: dossier_id,
|
||||||
'piece_justificative_' + all_pj_type[0].to_s => piece_justificative_0,
|
"piece_justificative_#{all_pj_type[0].to_s}" => piece_justificative_0,
|
||||||
'piece_justificative_' + all_pj_type[1].to_s => piece_justificative_1
|
"piece_justificative_#{all_pj_type[1].to_s}" => piece_justificative_1
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -355,8 +355,8 @@ shared_examples 'description_controller_spec' do
|
||||||
subject {
|
subject {
|
||||||
patch :pieces_justificatives, params: {
|
patch :pieces_justificatives, params: {
|
||||||
dossier_id: dossier.id,
|
dossier_id: dossier.id,
|
||||||
'piece_justificative_' + all_pj_type[0].to_s => piece_justificative_0,
|
"piece_justificative_#{all_pj_type[0].to_s}" => piece_justificative_0,
|
||||||
'piece_justificative_' + all_pj_type[1].to_s => piece_justificative_1
|
"piece_justificative_#{all_pj_type[1].to_s}" => piece_justificative_1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -434,8 +434,8 @@ shared_examples 'description_controller_spec_POST_piece_justificatives_for_owner
|
||||||
subject {
|
subject {
|
||||||
patch :pieces_justificatives, params: {
|
patch :pieces_justificatives, params: {
|
||||||
dossier_id: dossier.id,
|
dossier_id: dossier.id,
|
||||||
'piece_justificative_' + all_pj_type[0].to_s => piece_justificative_0,
|
"piece_justificative_#{all_pj_type[0].to_s}" => piece_justificative_0,
|
||||||
'piece_justificative_' + all_pj_type[1].to_s => piece_justificative_1
|
"piece_justificative_#{all_pj_type[1].to_s}" => piece_justificative_1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ feature 'user is on description page' do
|
||||||
end
|
end
|
||||||
context 'when he adds a piece_justificative and submit form', vcr: { cassette_name: 'description_page_upload_piece_justificative_adds_cerfa_and_submit' } do
|
context 'when he adds a piece_justificative and submit form', vcr: { cassette_name: 'description_page_upload_piece_justificative_adds_cerfa_and_submit' } do
|
||||||
before do
|
before do
|
||||||
file_input_id = 'piece_justificative_' + dossier.types_de_piece_justificative.first.id.to_s
|
file_input_id = "piece_justificative_#{dossier.types_de_piece_justificative.first.id.to_s}"
|
||||||
attach_file(file_input_id, File.path('spec/support/files/dossierPDF.pdf'))
|
attach_file(file_input_id, File.path('spec/support/files/dossierPDF.pdf'))
|
||||||
click_on('Soumettre mon dossier')
|
click_on('Soumettre mon dossier')
|
||||||
dossier.reload
|
dossier.reload
|
||||||
|
|
|
@ -21,7 +21,7 @@ feature 'As a User I want to edit a dossier I own' do
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'Getting a dossier, I want to create a new message on', js: true do
|
scenario 'Getting a dossier, I want to create a new message on', js: true do
|
||||||
page.find_by_id('tr_dossier_' + dossier.id.to_s).click
|
page.find_by_id("tr_dossier_#{dossier.id.to_s}").click
|
||||||
expect(page).to have_current_path(users_dossier_recapitulatif_path(Dossier.first.id.to_s))
|
expect(page).to have_current_path(users_dossier_recapitulatif_path(Dossier.first.id.to_s))
|
||||||
page.find_by_id('open-message').click
|
page.find_by_id('open-message').click
|
||||||
page.execute_script("$('#texte_commentaire').data('wysihtml5').editor.setValue('Contenu du nouveau message')")
|
page.execute_script("$('#texte_commentaire').data('wysihtml5').editor.setValue('Contenu du nouveau message')")
|
||||||
|
@ -30,7 +30,7 @@ feature 'As a User I want to edit a dossier I own' do
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'On the same dossier, I want to edit informations', js: true do
|
scenario 'On the same dossier, I want to edit informations', js: true do
|
||||||
page.find_by_id('tr_dossier_' + dossier.id.to_s).click
|
page.find_by_id("tr_dossier_#{dossier.id.to_s}").click
|
||||||
expect(page).to have_current_path(users_dossier_recapitulatif_path(dossier.id.to_s))
|
expect(page).to have_current_path(users_dossier_recapitulatif_path(dossier.id.to_s))
|
||||||
|
|
||||||
# Linked Dossier
|
# Linked Dossier
|
||||||
|
|
Loading…
Add table
Reference in a new issue