From 8ff3d9ea47a172d6394c144324682fb759803a00 Mon Sep 17 00:00:00 2001 From: clemkeirua Date: Fri, 3 Apr 2020 20:19:23 +0200 Subject: [PATCH] update existing tests --- spec/features/users/list_dossiers_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/features/users/list_dossiers_spec.rb b/spec/features/users/list_dossiers_spec.rb index fa514bd06..a601eb2fb 100644 --- a/spec/features/users/list_dossiers_spec.rb +++ b/spec/features/users/list_dossiers_spec.rb @@ -85,13 +85,13 @@ describe 'user access to the list of their dossiers' do describe "recherche" do context "when the dossier does not exist" do before do - page.find_by_id('dossier_id').set(10000000) + page.find_by_id('q').set(10000000) click_button("Rechercher") end it "shows an error message on the dossiers page" do expect(current_path).to eq(dossiers_path) - expect(page).to have_content("Vous n’avez pas de dossier avec le nº 10000000.") + expect(page).to have_content("Vous n’avez pas de dossiers contenant « 10000000 ».") end end @@ -99,19 +99,19 @@ describe 'user access to the list of their dossiers' do let!(:dossier_other_user) { create(:dossier) } before do - page.find_by_id('dossier_id').set(dossier_other_user.id) + page.find_by_id('q').set(dossier_other_user.id) click_button("Rechercher") end it "shows an error message on the dossiers page" do expect(current_path).to eq(dossiers_path) - expect(page).to have_content("Vous n’avez pas de dossier avec le nº #{dossier_other_user.id}.") + expect(page).to have_content("Vous n’avez pas de dossiers contenant « #{dossier_other_user.id} ».") end end context "when the dossier belongs to the user" do before do - page.find_by_id('dossier_id').set(dossier_en_construction.id) + page.find_by_id('q').set(dossier_en_construction.id) click_button("Rechercher") end