diff --git a/spec/system/admin/budget_investments_spec.rb b/spec/system/admin/budget_investments_spec.rb index a85b3e1c0..e7152b3ef 100644 --- a/spec/system/admin/budget_investments_spec.rb +++ b/spec/system/admin/budget_investments_spec.rb @@ -1587,7 +1587,7 @@ describe "Admin budget investments", :admin do investment1.update!(administrator: admin) investment2.update!(administrator: admin) - login_as(valuator.user.reload) + login_as(valuator.user) visit root_path click_link "Menu" click_link "Valuation" diff --git a/spec/system/admin/translatable_spec.rb b/spec/system/admin/translatable_spec.rb index 9253b504b..f83acf7ab 100644 --- a/spec/system/admin/translatable_spec.rb +++ b/spec/system/admin/translatable_spec.rb @@ -323,7 +323,7 @@ describe "Admin edit translatable records", :admin do expect(page).not_to have_css "#error_explanation" - visit edit_admin_legislation_process_path(translatable.reload) + visit edit_admin_legislation_process_path(translatable) expect_to_have_language_selected "Français" expect_not_to_have_language "English" diff --git a/spec/system/proposal_notifications_spec.rb b/spec/system/proposal_notifications_spec.rb index f8d124f43..b4e49fb30 100644 --- a/spec/system/proposal_notifications_spec.rb +++ b/spec/system/proposal_notifications_spec.rb @@ -237,8 +237,7 @@ describe "Proposal Notifications" do user2 = create(:user, followables: [proposal]) user3 = create(:user) - login_as author.reload - visit root_path + login_as author visit new_proposal_notification_path(proposal_id: proposal.id) @@ -250,7 +249,7 @@ describe "Proposal Notifications" do expect(page).to have_content "Your message has been sent correctly." logout - login_as user1.reload + login_as user1 visit root_path click_link "You have a new notification" @@ -262,7 +261,7 @@ describe "Proposal Notifications" do expect(page).to have_current_path(proposal_path(proposal)) logout - login_as user2.reload + login_as user2 visit root_path click_link "You have a new notification" @@ -274,7 +273,7 @@ describe "Proposal Notifications" do expect(page).to have_current_path(proposal_path(proposal)) logout - login_as user3.reload + login_as user3 visit root_path click_link "You don't have new notifications" @@ -332,7 +331,7 @@ describe "Proposal Notifications" do proposal = create(:proposal, author: author) user = create(:user, followables: [proposal]) - login_as author.reload + login_as author 3.times do visit new_proposal_notification_path(proposal_id: proposal.id) @@ -345,7 +344,7 @@ describe "Proposal Notifications" do end logout - login_as user.reload + login_as user visit root_path click_link "You have 3 new notifications" @@ -373,7 +372,7 @@ describe "Proposal Notifications" do author = create(:user) proposal = create(:proposal, author: author) - login_as author.reload + login_as author visit new_proposal_notification_path(proposal_id: proposal.id) fill_in "Title", with: "Thank you for supporting my proposal" @@ -395,7 +394,7 @@ describe "Proposal Notifications" do author = create(:user) proposal = create(:proposal, author: author) - login_as author.reload + login_as author visit new_proposal_notification_path(proposal_id: proposal.id) fill_in "Title", with: "Thank you for supporting my proposal"