diff --git a/admin/spec/features/users_spec.rb b/admin/spec/features/users_spec.rb index 67b3a2a6070..36cd9eba915 100644 --- a/admin/spec/features/users_spec.rb +++ b/admin/spec/features/users_spec.rb @@ -72,7 +72,7 @@ expect(page).to have_content("Users / customer@example.com") expect(page).to have_content("Lifetime Stats") expect(page).to have_content("Roles") - expect(find("label", text: "Admin").find("input[type=checkbox]").checked?).to eq(false) + expect(find("label", text: /admin/i).find("input[type=checkbox]").checked?).to eq(false) end it "allows editing of the existing user" do @@ -93,12 +93,12 @@ # Update user within("form.edit_user") do fill_in "Email", with: "dogtown@example.com" - find("label", text: "Admin").find("input[type=checkbox]").check + find("label", text: /admin/i).find("input[type=checkbox]").check click_on "Update" end expect(page).to have_content("Users / dogtown@example.com") - expect(find("label", text: "Admin").find("input[type=checkbox]").checked?).to eq(true) + expect(find("label", text: /admin/i).find("input[type=checkbox]").checked?).to eq(true) # Cancel out of editing within("form.edit_user") do