lib/generators/koi/admin_controller/templates/controller_spec.rb.tt in katalyst-koi-4.5.0.beta.2 vs lib/generators/koi/admin_controller/templates/controller_spec.rb.tt in katalyst-koi-4.5.0

- old
+ new

@@ -21,11 +21,11 @@ context "with a large collection" do before { create_list(:<%= singular_name %>, 25) } # rubocop:disable FactoryBot/ExcessiveCreateList it "paginates the collection" do action - expect(response.body).to have_selector("tbody tr", count: 20) + expect(response.body).to have_css("tbody tr", count: 20) end end context "with sort parameter" do let(:action) { get polymorphic_path([:admin, <%= class_name %>], sort: "<%= search_attribute %> desc") } @@ -35,11 +35,11 @@ create(:<%= singular_name %>, <%= search_attribute %>: "second") end it "finds first in second place" do action - expect(response.body).to have_selector("tbody tr + tr td", text: "first") + expect(response.body).to have_css("tbody tr + tr td", text: "first") end end context "with search parameter" do let(:action) { get polymorphic_path([:admin, <%= class_name %>], search: "first") } @@ -49,15 +49,15 @@ create(:<%= singular_name %>, <%= search_attribute %>: "second") end it "finds the needle" do action - expect(response.body).to have_selector("table td", text: "first") + expect(response.body).to have_css("table td", text: "first") end it "removes the chaff" do action - expect(response.body).not_to have_selector("table td", text: "second") + expect(response.body).to have_no_css("table td", text: "second") end end end describe "GET /admin/<%= plural_name %>/new" do