Allow using table actions in different namespaces

This way we can reuse it in sections like SDGManagement and URLs will be
automatically generated as expected.
This commit is contained in:
Javi Martín
2021-01-07 17:49:24 +01:00
parent 2968275a1c
commit c66a5a30ef
10 changed files with 63 additions and 14 deletions

View File

@@ -3,6 +3,10 @@ require "rails_helper"
describe Admin::Roles::TableActionsComponent, type: :component do
let(:user) { create(:user) }
before do
allow(ViewComponent::Base).to receive(:test_controller).and_return("Admin::BaseController")
end
it "renders link to add the role for new records" do
render_inline Admin::Roles::TableActionsComponent.new(user.build_manager)