From 66d6627c895facce8958f107c82d39b3bf320361 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 19 Mar 2026 11:22:41 +1100 Subject: [PATCH] Spec recently changed code path --- spec/system/admin/users_spec.rb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/spec/system/admin/users_spec.rb b/spec/system/admin/users_spec.rb index 4a53307e19..45f950f45c 100644 --- a/spec/system/admin/users_spec.rb +++ b/spec/system/admin/users_spec.rb @@ -5,8 +5,10 @@ require "system_helper" RSpec.describe "Managing users" do include AuthenticationHelper + let(:admin_user) { create(:admin_user) } + before do - login_as_admin + login_as admin_user end context "from the index page" do @@ -35,6 +37,18 @@ RSpec.describe "Managing users" do click_button "Update" expect(page).to have_content("Account updated") + expect(current_path).to eq spree.edit_admin_user_path(user_a) + end + + it "allows to change your own password without logging you out" do + visit spree.edit_admin_user_path(admin_user) + + fill_in "user_password", with: "welcome" + fill_in "user_password_confirmation", with: "welcome" + click_button "Update" + + expect(page).to have_content("Account updated") + expect(current_path).to eq spree.edit_admin_user_path(admin_user) end it "should let me edit the user email" do